agentleFS
loganware05loganware05/captains-compass-cursor/.cursor/skills/source-code-context/SKILL.md

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

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
  1. Distinctive:

    Prefer opensrc when installed:

    line 34
  2. Very specific:

    Search with rg, find, or read specific files under the returned path

    line 37
  3. Very specific:

    If opensrc is unavailable, use a Captain-approved local checkout, e.g.

    line 38
  4. Distinctive:

    If the API still cannot be found, stop and report—do not silently install a replacement package.

    line 42

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 path

See 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

  1. Confirm the task needs implementation detail beyond types/docs (internal behavior, edge cases, current API shape).
  2. Prefer opensrc when installed:
    • opensrc path <package> (npm; lockfile version via --cwd when 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
  3. 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.
  4. Identify the concrete files/functions/examples used as reference.
  5. Implement only the minimal product change needed.
  6. In the summary, cite which source paths were searched and which symbols were followed.
  7. 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

Download now (ZIP)

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.