code2prompt Agent Skills & AI Rules

GitHub

A CLI tool to convert your codebase into a single LLM prompt with source tree, prompt templating, and token counting.

7,728 stars Rust Rust 134 files · ~117,615 tokens #ai#chatgpt#claude#cli#command-line#command-line-tool#gpt#llm
RAW Rules
20 Discovered Rules • ~4,196 Estimated Tokens
Quick:
Loading skill content...

AI Agent Protocol & Instructions

AGENTS.md root-instruction ~299 tokens
Raw
# code2prompt agent guide

Project-specific skills live in `.agents/skills/`.
These contributor skills use `metadata.internal: true` to stay out of public
Skills CLI discovery. The installable user skill lives in `skills/code2prompt/`.

## Rules

- Follow existing code2prompt patterns before generic best practices.
- Put reusable product logic in `code2prompt-core`.
- Keep CLI/TUI concerns in `code2prompt`.
- Keep Python bindings thin: delegate behavior to the core.
- `Code2PromptSession` coordinates configuration, selection, and loaded `SessionData`.
- Keep the website as a consumer of product behavior, not a second implementation.
- Prefer small changes and existing dependencies.
- Preserve public behavior unless the task explicitly changes it.
- Bug fixes should include a regression test when practical.
- Comments should explain non-obvious intent, constraints, or tradeoffs, not narrate code.
- Do not claim completion until the relevant verification skill passes.

## Skills

- Implementation/refactoring → `code2prompt-conventions`
- `crates/code2prompt-core/**` → `verify-core`
- `crates/code2prompt/**` → `verify-cli`
- `crates/code2prompt-python/**` → `verify-python`
- `website/**` → `verify-website`
- Public behavior/docs/comments → `documentation`

A change can require several verification skills. Root `cargo test` does not exercise
the Python bindings.