Code2Skill CLI
CLI turns functions and commands from source code into verified skill records with provenance and retrieval metadata.
- 110 ★ on the repository
- Last commit
Extended access
Why this level
- Repository code fragments are sent to the model address you specify.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/code2skillDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Repository code fragments are sent to the model address you specify.
This is third-party code. Review the repository files before installing.
What it does
Code2Skill walks a repository and, for each function, method or entry point, estimates whether it holds a reusable procedure. From these fragments a model builds a typed skill record: atomic, composite or pattern. Verification follows. The model rewrites the code from the record without seeing the source, repository name or file path, and a judge compares the result with the original. Accepted records receive closed-vocabulary tags for retrieval, weak ones are filtered out, and a representative stays for each group sharing a task. The implementation accompanies a paper on synthesizing skills from code, and the judge remains a consistency check rather than a proof of program equivalence.
Who it is for. Builders of agent systems and researchers who create skill libraries from existing code.
Good fit when
- You need a set of procedural skills for an agent from an internal repository.
- A team checks how well a recorded skill reproduces the behavior of the source function.
- A skill corpus has to be indexed by task, action and target.
- A researcher reproduces the paper's experiment on their own data.
Not a fit when
- You need a ready skill for Claude Code or Cursor; the CLI emits records rather than installed skills.
- Code cannot be sent to an external model under any conditions.
- You need strict proof of equivalence; the judge only gives a consistency estimate.
Example request
Run code2skill on this repository with my model and show how many records were accepted and how many were rejected.Limitations
A model with an OpenAI-compatible `/chat/completions` address is required: a run sends code fragments to the endpoint you pick and stores them nowhere else. Public model addresses are rejected by default and are enabled with `--allow-public-model-url`, which you should do only for a trusted service. The judge remains a consistency check and can be wrong. Record quality depends on the chosen model, and a run over a large repository spends a noticeable number of tokens. The project accompanies a research paper, so the interface and format may change between versions. No third-party package is needed to run it, but Python 3 is.
How to disable. Delete the virtual environment and the `runs` results folder, and clear the `.env` file with the model address and key separately.
FAQ
How do I run Code2Skill?
Create a virtual environment, install the package with `python -m pip install -e .` and run `code2skill run /path/to/repository` with `--base-url`, `--model` and `--output-dir`.
Can I try it without a model?
Yes. The `examples/offline_demo.py` script runs every stage with a deterministic client and no network and writes results to `examples/output/`.
Which files does a run produce?
A manifest and summary, source units, decisions, accepted and rejected records, retrieval records, prompt and response traces and a purpose index.
How do I inspect model prompts before a call?
`code2skill show-prompts --stage regeneration` prints the messages for a chosen stage without making any model call.
What is the purpose index?
A deterministic filter that drops low-value records and groups them by task, action and target. The `code2skill purpose-index` command builds it from accepted JSONL records.
Discussion
No questions or reviews yet.
Related
CLI toolsSkillCorpus
skillcorpus
The open part of the SkillCorpus pipeline: collects SKILL.md files from public repos, checks security and licenses, scores quality and matches skills to a task
A catalog of nearly two hundred skills: code delivery, review, debugging, AI governance, product work and agent coordination.
Runs a coding agent over tasks with known answers, studies failures and writes new skills and prompts, versioned in Git.
A meta-skill that distills methodologies from books, long videos, podcasts and courses into a set of ready-to-invoke agent skills
A desktop app and CLI to install, sync and organize agent skills across Claude Code, Codex, Cursor and other tools
A CLI skill manager for AI agents: install from repositories, translate between agent formats and deploy into their configs
README in short
A seven-stage pipeline: source-unit tagging, skill extraction, blind regeneration, comparison with the source, adjudication, tagging and a purpose index.