Skip to main content

agentpack

CI PyPI License: MIT Python 3.10+

Agent Knowledge Compiler — compile your repository's knowledge into optimized, validated packages for any AI agent.

Write your documentation once. Generate agent-specific outputs for Claude, Cursor, ChatGPT, Gemini, Copilot, Codex, Aider, and more. Think of it as TypeScript for AI knowledge: one source, many compatible targets, with validation and auto-fix built in.

Books · code · Markdown · docs · slides
              │
              ▼
       agentpack compiler
              │
    ┌─────────┼─────────┬──────────┐
    ▼         ▼         ▼          ▼
CLAUDE.md  .cursorrules  AGENTS.md  custom_instructions.md

Install

pip install agentpack

Usage

# Compile your repo for a specific agent
agentpack compile . --target claude     # → dist/claude/CLAUDE.md
agentpack compile . --target cursor     # → dist/cursor/.cursorrules
agentpack compile . --target chatgpt    # → dist/chatgpt/custom_instructions.md
agentpack compile . --target gemini     # → dist/gemini/GEMINI.md
agentpack compile . --target copilot    # → dist/copilot/.github/copilot-instructions.md
agentpack compile . --target codex      # → dist/codex/AGENTS.md
agentpack compile . --target aider      # → dist/aider/.aider.md

# Validate an existing file before loading it into an agent
agentpack validate CLAUDE.md --target claude

# Auto-fix issues in place
agentpack fix CLAUDE.md --target claude --inplace

# Score your repo against all targets at once
agentpack score .

Validation output

┌─ Validation ───────────────────────────────────────────────────┐
│ PASSED  Score: [████████░░] 82/100                             │
│ Target: claude  •  6,234 chars                                 │
└────────────────────────────────────────────────────────────────┘

Warnings:
  ⚠ [CLAUDE_001] Content is 6234 chars — above recommended 8000.  (fixable — run `agentpack fix`)
  ⚠ [CLAUDE_003] Markdown tables detected — may not render in all Claude contexts.

Compatibility score

agentpack score .

 Agent Compatibility
┌──────────┬──────────────────┬────────┬────────┬──────────┐
│ Target   │ Score            │ Status │ Errors │ Warnings │
├──────────┼──────────────────┼────────┼────────┼──────────┤
│ claude   │ ██████████ 100%  │ Pass   │ 0      │ 0        │
│ cursor   │ ██████████ 100%  │ Pass   │ 0      │ 0        │
│ chatgpt  │ ████████░░ 82%   │ Pass   │ 0      │ 1        │
│ gemini   │ ██████████ 100%  │ Pass   │ 0      │ 0        │
│ copilot  │ ██████████ 100%  │ Pass   │ 0      │ 0        │
│ codex    │ ██████████ 100%  │ Pass   │ 0      │ 0        │
│ aider    │ ██████████ 100%  │ Pass   │ 0      │ 0        │
└──────────┴──────────────────┴────────┴────────┴──────────┘

Supported targets

Target Output file Key constraint Notes
claude CLAUDE.md 8 000 chars recommended Anthropic Claude Code
cursor .cursorrules 10 000 chars recommended Cursor IDE
chatgpt custom_instructions.md 1 500 chars hard limit OpenAI ChatGPT
gemini GEMINI.md 5 000 chars recommended Google Gemini
copilot .github/copilot-instructions.md 8 000 chars hard limit GitHub Copilot
codex AGENTS.md 5 000 chars recommended OpenAI Codex CLI
aider .aider.md 3 000 chars recommended aider-chat

Version pinning syntax is supported and reserved for future per-version adapters: --target claude@5


Adding a new target

Each target is a single Python file with three methods:

# src/agentpack/targets/myagent.py
from .base import BaseTarget, Issue, ValidationResult

class MyAgentTarget(BaseTarget):
    name = "myagent"
    output_filename = "MYAGENT.md"
    recommended_max_chars = 4_000

    def validate(self, content: str) -> ValidationResult:
        ...

    def compile(self, sources: dict[str, str]) -> str:
        ...

    def fix(self, content: str, result: ValidationResult) -> tuple[str, list[str]]:
        ...

Then register it in src/agentpack/targets/__init__.py:

from .myagent import MyAgentTarget
TARGETS["myagent"] = MyAgentTarget

No changes needed anywhere else.


Development

git clone https://github.com/PrakhyathS/agentpack
cd agentpack
pip install typer rich pytest
PYTHONPATH=src python -m pytest tests/ -v

Why agentpack?

Every AI agent has different constraints — character limits, markdown support, frontmatter schemas, formatting expectations. Developers discover these constraints by trial and error, after the agent has already failed or silently degraded.

agentpack makes constraints explicit, machine-checkable, and auto-fixable — the same way TypeScript catches type errors at compile time rather than at runtime.

When an agent provider updates their recommendations, only the relevant adapter changes. Your source knowledge stays the same.


Contributing

Pull requests welcome. The highest-value contributions are new target adapters for agents not yet supported. Each adapter is ~60 lines. See src/agentpack/targets/ for examples.

License

MIT © PrakhyathS

Metadata

Release files for agentpack-skills 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentpack-skills 0.1.0
File Size Uploaded Provenance Actions
agentpack_skills-0.1.0.tar.gz 13.0 kB With provenance Details for agentpack_skills-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agentpack-skills 0.1.0
File Interpreter ABI Platform Actions
agentpack_skills-0.1.0-py3-none-any.whl Python 3 none any Details for agentpack_skills-0.1.0-py3-none-any.whl

Total release size: 28.8 kB

Release files / agentpack_skills-0.1.0.tar.gz

Download URL agentpack_skills-0.1.0.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
17a76c98ff8c27d9f172aa85e233dbe1b409f843e607aa395cacccc6c9b01d83
BLAKE2b-256 checksum
How to use checksums
17b7586badf7250af1ab070e52423ab9b00db67e25ad974fe6244ab85133bd85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 29, 2026.

Transparency log

Release files / agentpack_skills-0.1.0-py3-none-any.whl

Download URL agentpack_skills-0.1.0-py3-none-any.whl
Size 15.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d427eab22fa50c322f3e6a14eb216ce5e8ff4be3193bc76ee6b3cf6d91451ed
BLAKE2b-256 checksum
How to use checksums
307f1c9e0629adf0e9321a2cff6e8c096e4fa2adc8933b283d4596eb2c153345
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 29, 2026.

Transparency log

Security for agentpack-skills 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agentpack_skills-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page