# Code2Prompt

> Use this tool when you need to analyze codebases and generate structured summaries for AI consumption, solving problems such as code understanding and documentation generation. It takes in code repositories and outputs contextual prompts, providing fine-grained control over file inclusion and formatting options. Use Code2Prompt in workflows requiring code analysis, documentation generation, and technical assistance to bridge the gap between code repositories and language models.

Canonical page: https://skillsregistry.net/skills/odancona-code2prompt  
JSON: https://api.skillsregistry.net/v1/skills/odancona-code2prompt

## Description

Code2Prompt MCP server leverages the high-performance code2prompt-rs Rust library to analyze codebases and generate structured summaries optimized for AI consumption. It provides tools for extracting context from repositories with fine-grained control over file inclusion/exclusion patterns, formatting options, and token encoding. The server bridges the gap between code repositories and language models by transforming complex codebases into contextual prompts that help AI assistants better understand and work with code, making it particularly valuable for code analysis, documentation generation, and technical assistance workflows.

## Trust

- **Trust score (0–1):** 0.99
- **Verification tier:** verified
- **Last scanned:** 2026-09-19

## Facts

- **Version:** 1.0.0
- **Skill type:** atomic
- **Execution layer:** mcp-remote
- **Runtime environment:** api
- **Category:** ai-ml
- **Updated:** 2026-09-19

## Source

- **Source listing:** [PulseMCP](https://www.pulsemcp.com/servers/odancona-code2prompt)
- **Repository:** <https://github.com/odancona/code2prompt-mcp>

## Use it

Resolve this record through the SkillsRegistry MCP server (no auth, read-only):

```
claude mcp add --transport http --scope user skillsregistry https://api.skillsregistry.net/mcp
```

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_skill",
    "arguments": {
      "slug": "odancona-code2prompt"
    }
  }
}
```

REST: `GET https://api.skillsregistry.net/v1/skills/odancona-code2prompt` · pull for local use: `GET https://api.skillsregistry.net/v1/skills/odancona-code2prompt/pull`

---
SkillsRegistry indexes agent skills from public registries and GitHub. Skills we have analysed are scanned with Circle-IR and scored on six dimensions; each listing states its scan coverage. More: https://skillsregistry.net/llms.txt
