add-knowledge
Skill3 starsChanged 6 days agoMITView on GitHub
Add a knowledge source (public website, SharePoint, OneDrive, or a locally uploaded file) to a locally-cloned Copilot Studio agentic-loop agent by writing the modern capabilities/knowledge YAML. Use when the user asks to add, attach, or ground a knowledge source (a public website, SharePoint or OneDrive link, or an uploaded file) on a locally-cloned Copilot Studio agent.
4 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- microsoft/copilot-studio-pluginedited, first seen Sep 25, 2026
- thunderphone/skillstheir own version, first seen Sep 16, 2026
- tikhomirovv/agents-knowledgetheir own version, first seen Aug 1, 2026
- microsoft/skills-for-copilot-studiotheir own version, first seen Apr 1, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- microsoft/copilot-studio-plugin★ 8213% same
Wrote their own version · 3
- microsoft/skills-for-copilot-studio★ 486same name
- tikhomirovv/agents-knowledge★ 2same name
- thunderphone/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- add-channelSkill
- add-skillSkill
- clone-agentSkill
- create-agentSkill
- delete-agentSkill
- deploy-agentSkill
- publish-agentSkill
- pull-agentSkill
- get-us-temperatureSkill
- get-us-weatherSkill
- my-skill-1Skill
- skill-1Skill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 9 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Add one knowledge source to a locally-cloned Copilot Studio agentic-loop agent.
- Very specific: line 18
If an agent workspace was supplied, resolve that exact directory first and require its root-level settings.mcs.yml.
- Distinctive: line 23
If none is found, tell the user this skill needs a locally-cloned agentic-loop agent.
- Distinctive: line 27
If several are found, ask the user which agent to add the knowledge to.
- Very specific: line 28
Read the agent's schemaName from settings.mcs.yml (e.g.
- Distinctive: line 40
Read only the references required for the selected source, completely, before writing any YAML or copying any payload.
- Distinctive: line 44
Every source requires common schema and naming rules, plus:
- Distinctive: line 53
All URLs must have no embedded username or password.
- Distinctive: line 59
Only for SharePoint/OneDrive, offer the author-only check or honor an explicit request for it.
- Distinctive: line 64
Read access-check setup and results only after the user opts in, before authenticating.
- Very specific: line 71
Follow the loaded common and selected-source contracts exactly.
- Distinctive: line 91
Do not run either lifecycle workflow as part of adding knowledge.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add a Knowledge Source
Add one knowledge source to a locally-cloned Copilot Studio agentic-loop agent. This skill only authors local files; it does not push or publish. Never invent behavior the files do not support.
Initial request: $ARGUMENTS
1. Resolve the target and input
- If an agent workspace was supplied, resolve that exact directory first and require its
root-level
settings.mcs.yml. If it is missing, invalid, or ambiguous, stop and report the supplied target; never substitute a discovered workspace. Only when no workspace was supplied, auto-discover withGlob: **/settings.mcs.yml. A cloned agentic-loop workspace containssettings.mcs.ymlat its root. Never hardcode an agent name. - If none is found, tell the user this skill needs a locally-cloned agentic-loop agent. Direct
them to the
clone-agentworkflow, which usesmsagent agent create --agent-type MCSAgentwith either--mcs-clone-agent-idor--mcs-clone-agent-schemaname, plus the source environment and project root. Do not clone implicitly or bypass that workflow. Stop. - If several are found, ask the user which agent to add the knowledge to.
- Read the agent's
schemaNamefromsettings.mcs.yml(e.g.crbab_guitarcoach_dcF_b3) — it is the filename prefix for source-backed knowledge components. Parse the settings with an available local YAML parser. Verify a versionedcliagent-template and the GitHub Copilot harness:configuration.authoringModel: CliCopilotorconfiguration.recognizer.kind: CLICopilotRecognizer. If another harness or a non-CLI template is identified, stop before any writes. If identity is unknown, ask for clarification; do not infer support from the schema name or folder alone. - Extract the source URL or local file path, plus any requested name/description. Ask for missing input; do not create directories or files yet.
2. Select and load the authoring contract
Read only the references required for the selected source, completely, before writing any YAML or copying any payload. Resolve every reference from this skill's own directory, never from a plugin root or sibling skill. If a required reference cannot be read, stop and report its path.
Every source requires common schema and naming rules, plus:
| Input | Selected source reference | Additional required reference |
Absolute HTTPS URL on a -my.sharepoint.* host with /personal/... | OneDrive file | SharePoint/OneDrive URL normalization |
HTTPS URL on *.sharepoint.com, *.sharepoint.us, *.sharepoint.cn, or *.sharepoint-mil.us | SharePoint file/folder | SharePoint/OneDrive URL normalization |
| Other absolute HTTPS URL | Public website | None |
| Existing regular local file | Uploaded file | None |
All URLs must have no embedded username or password. Reject unsupported or ambiguous inputs and explain the problem; ask for a supported source rather than guessing. Apply the selected reference's validation before authoring.
3. Optional access check
Only for SharePoint/OneDrive, offer the author-only check or honor an explicit request for it.
Explain that each end user's permissions govern runtime retrieval: author access does not prove
end-user access. Explain that delegated Files.ReadWrite consent grants read/write access to files
the signed-in user can access, before asking the user to opt in.
Read access-check setup and results only after the user opts in, before authenticating. If the user declines, do not load it, resolve the helper, or authenticate. The check is optional and best-effort. If its reference/helper or setup is unavailable, report that the check could not run and continue adding the source without it.
4. Author and report
Follow the loaded common and selected-source contracts exactly. Encode externally derived YAML
strings using JSON.stringify(value) semantics. Check the 100-character schema-name budget and
component collisions before writing. Never overwrite an uploaded payload or sidecar without
explicit replacement consent; stop if replacement cannot identify exactly one existing sidecar.
Re-read and parse every written YAML artifact with an available local YAML parser. Verify
the selected source kind, exact normalized URL or relative payload path, unique component
identity, and 100-character schema budget against the loaded contracts. For uploads, verify
the copied file's bytes match the source. Review the diff (or before/after file inventory for
an untracked workspace): only the intended knowledge component and approved payload/sidecar
may change; preserve unrelated content and leave .config/, .mcs/, and agent.sync.yaml
untouched. If parsing, artifact validation, or diff review cannot complete, report the failure
and do not claim success.
Report the source kind, normalized siteUrl or copied file, and written component path. State that
the changes remain local. To upload a draft, direct the user to the deploy-agent workflow
(msagent agent deploy); to make the knowledge live, direct them to publish-agent
(msagent agent deploy --publish), which requires explicit publication confirmation.
Both routes require the registered MSAGENT project root and an explicit deployment ID or name;
the authored agent workspace is not the registration root. There is no standalone pack step.
Do not run either lifecycle workflow as part of adding knowledge. Use the common contract's
limitations for unsupported knowledge types.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

