source-code-context
Skill2 starsChanged 31 days agoMITView on GitHub
Fetches and searches real package or repo source (prefer opensrc) before guessing APIs from incomplete docs
- Installs packages
In this repository52 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/00-core-operating-model.mdcCursor rule
- .cursor/rules/01-plan-approval-gate.mdcCursor rule
- .cursor/rules/02-git-worktree-policy.mdcCursor rule
- .cursor/rules/03-validation-definition-of-done.mdcCursor rule
- .cursor/rules/04-documentation-memory.mdcCursor rule
- accessibility-reviewSkill
- agent-skills-packagingSkill
- autonomy-budgetSkill
- bounded-autonomySkill
- candidate-promotionSkill
- capability-planningSkill
- code-reviewerSkill
- code-structure-cleanupSkill
- compass-evaluatorSkill
- context-inodesSkill
- dependency-supply-chainSkill
- docker-cloudSkill
- embedding-providersSkill
- execution-telemetrySkill
- experience-routingSkill
- experience-skill-trainingSkill
- external-knowledge-ingestSkill
- github-integrationSkill
- goose-agent-orchestrationSkill
- harness-gcSkill
- hosted-vector-dbSkill
- implementation-planningSkill
- ios-engineeringSkill
- knowledge-stewardSkill
- linear-integrationSkill
- node-engineeringSkill
- northstar-connected-routineSkill
- notion-integrationSkill
- package-registry-tiSkill
- persistent-role-promotionSkill
- playwright-browser-validationSkill
- postgres-prismaSkill
- procedure-playbooksSkill
- project-overseerSkill
- pull-request-preparationSkill
- python-mlSkill
- react-engineeringSkill
- repository-discoverySkill
- review-fix-loopSkill
- security-audit-proceduresSkill
- security-reviewSkill
- skill-learning-loopSkill
- skill-lifecycleSkill
- technology-intelligence-liveSkill
- testing-validationSkill
- worktree-orchestrationSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 34
Prefer opensrc when installed:
- Very specific: line 37
Search with rg, find, or read specific files under the returned path
- Very specific: line 38
If opensrc is unavailable, use a Captain-approved local checkout, e.g.
- Distinctive: line 42
If the API still cannot be found, stop and report—do not silently install a replacement package.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Source Code as Agent Context
Use this Skill when
Integrating or debugging a package, SDK, framework, or open-source tool when docs are weak, stale, or incomplete—or when the agent is guessing API names that may not exist.
Inputs
- Package or repository name (and version if known)
- Product repo lockfiles / dependency manifests when present
- Optional: Captain-approved local reference path under
reference/repos/
Prerequisites
Preferred (optional): opensrc CLI for fetch-and-cache of dependency source.
npm install -g opensrc
command -v opensrc # must succeed before relying on opensrc pathSee docs/integrations/opensrc.md in the control repo (or the installed product copy of that doc if present).
opensrc is not required for Compass install or doctor. If unavailable, use the fallback path below.
Procedure
- Confirm the task needs implementation detail beyond types/docs (internal behavior, edge cases, current API shape).
- Prefer opensrc when installed:
opensrc path <package>(npm; lockfile version via--cwdwhen useful)opensrc path pypi:<package>/opensrc path crates:<crate>/opensrc path owner/repo- Search with
rg,find, or read specific files under the returned path
- If opensrc is unavailable, use a Captain-approved local checkout, e.g.
reference/repos/github.com/<org>/<repo>, or an existing clone path the Captain provides. Do not invent large reference trees without approval. - Identify the concrete files/functions/examples used as reference.
- Implement only the minimal product change needed.
- In the summary, cite which source paths were searched and which symbols were followed.
- If the API still cannot be found, stop and report—do not silently install a replacement package.
Output
Working change (under an approved plan when product behavior changes), plus a short citation of the source files/symbols referenced.
Prohibited actions
- Guessing API names when package/repo source is available to search
- Dumping entire repositories into chat context
- Installing alternative dependencies without Captain approval
- Treating opensrc as mandatory (fallback must remain valid)
- Fetching source for trivial questions that types or official docs already answer
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

