agentleFS
zhangguiping-xydtzhangguiping-xydt/repo-to-skill/skills/repo-to-skill/SKILL.md

repo-to-skill

Skill4 starsChanged 4 months agoApache-2.0View on GitHub

Generate callable agent skills from a local repository and a user goal.

4 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions4 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    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.

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 6

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

    Use this skill when a user gives you a local repository and a goal, and wants the right existing APIs turned into callable agent skills.

    line 8
  2. Very specific:

    Prefer 3-20 APIs. Choose fewer if the goal is narrow.

    line 36
  3. Distinctive:

    Write a selection file:

    line 39
  4. Very specific:

    If you cannot confidently select slugs, let repo-to-skill use its deterministic fallback:

    line 59
  5. Very specific:

    Use when the goal maps to a predefined workflow (count-then-list, single read-only query) rather than an ad-hoc API chain.

    line 91
  6. Distinctive:

    Do not modify the target repository.

    line 118
  7. Distinctive:

    Do not hard-code endpoints or tokens.

    line 119
  8. Distinctive:

    Do not put local machine paths, private URLs, or credentials into the generated skill.

    line 120
  9. Distinctive:

    If an interface has side effects or unclear behavior, preserve that uncertainty in the final explanation instead of overselling it.

    line 123

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

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

repo-to-skill

Use this skill when a user gives you a local repository and a goal, and wants the right existing APIs turned into callable agent skills.

Core promise:

Give it a repo and a user goal. It finds the right APIs and turns them into callable agent skills.

When to use

  • The user has a legacy or internal codebase with HTTP APIs.
  • The user wants a focused callable skill for a business goal, not a generic repo map.
  • The goal needs live behavior from the existing system rather than reimplementing logic.

Workflow

  1. Analyze the target repository without modifying it:

    repo-to-skill analyze <repo> --output <workdir>/analysis
  2. Inspect <workdir>/analysis/callable_capabilities.json.

    Focus on each interface's slug, route, handler_symbol, business_method, request fields, response fields, and safety notes.

  3. Translate the user's goal into a small set of relevant interface slugs.

    Prefer 3-20 APIs. Choose fewer if the goal is narrow. Do not invent slugs; every slug must appear in callable_capabilities.json.

  4. Write a selection file:

    {
      "need_summary": "Generate a callable skill for the user's concrete goal.",
      "selected_slugs": ["first-slug", "second-slug"],
      "selection_source": "agentic"
    }
  5. Generate one bundle skill:

    repo-to-skill generate <repo> \
      --analysis <workdir>/analysis \
      --output <workdir>/skill \
      --mode callable-bundle \
      --selection-json <workdir>/selection.json

    If you cannot confidently select slugs, let repo-to-skill use its deterministic fallback:

    repo-to-skill generate <repo> \
      --analysis <workdir>/analysis \
      --output <workdir>/skill \
      --mode callable-bundle \
      --need "<user goal>" \
      --max-interfaces 12
  6. Validate the generated bundle:

    repo-to-skill validate <workdir>/skill/<bundle-name>

Output expectations

A callable bundle is one skill directory containing:

  • SKILL.md
  • manifest.yaml
  • tools/*.tool.yaml for the selected APIs
  • scripts/call_*.py callers for the selected APIs
  • references/capability-selection.md explaining why each API was selected
  • references/capability-source.md mapping tools back to source routes, handlers, business methods, and contract fields

Mode: task-workflow

Use when the goal maps to a predefined workflow (count-then-list, single read-only query) rather than an ad-hoc API chain. Provide --workflow-hints <hints.json> and --need "<goal>". v1 supports single-query and count-list-query only. See docs/skill-reference.md for the hints schema and the generated layout.

Output language

repo-to-skill decides the prose language (headings, labels, explanations in SKILL.md and references/*.md) from the --language option:

  • --language auto (default): detect from the goal/need text. If CJK characters make up at least 30% of non-whitespace characters, the output is zh-CN; otherwise it is en.
  • --language zh-CN or --language en: override detection explicitly.

Source-derived identifiers (slugs, routes, handler symbols, business method names, field names, # TODO markers) are never translated — they must stay faithful to the wire contract.

repo-to-skill generate <repo> \
  --analysis <workdir>/analysis \
  --output <workdir>/skill \
  --mode callable-bundle \
  --need "<user goal in any language>" \
  --language auto

Safety rules

  • Do not modify the target repository.
  • Do not hard-code endpoints or tokens.
  • Do not put local machine paths, private URLs, or credentials into the generated skill.
  • Generated callers preview by default. They only call a live system when the user sets the endpoint environment variable and passes --execute.
  • If an interface has side effects or unclear behavior, preserve that uncertainty in the final explanation instead of overselling it.

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.

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.