Agent Knowledge Compiler — one source, many AI targets
Project description
agentpack
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentpack_skills-0.1.0.tar.gz.
File metadata
- Download URL: agentpack_skills-0.1.0.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17a76c98ff8c27d9f172aa85e233dbe1b409f843e607aa395cacccc6c9b01d83
|
|
| MD5 |
78cbfee2c2095429e1cd2cd2b5682ffc
|
|
| BLAKE2b-256 |
17b7586badf7250af1ab070e52423ab9b00db67e25ad974fe6244ab85133bd85
|
Provenance
The following attestation bundles were made for agentpack_skills-0.1.0.tar.gz:
Publisher:
publish.yml on PrakhyathS/agentpack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentpack_skills-0.1.0.tar.gz -
Subject digest:
17a76c98ff8c27d9f172aa85e233dbe1b409f843e607aa395cacccc6c9b01d83 - Sigstore transparency entry: 2008642489
- Sigstore integration time:
-
Permalink:
PrakhyathS/agentpack@74dc205bfbcdad921e4268492f1da651d021bf2a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/PrakhyathS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@74dc205bfbcdad921e4268492f1da651d021bf2a -
Trigger Event:
push
-
Statement type:
File details
Details for the file agentpack_skills-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agentpack_skills-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d427eab22fa50c322f3e6a14eb216ce5e8ff4be3193bc76ee6b3cf6d91451ed
|
|
| MD5 |
999ebced6b5e42dc750f89f0f62b12a5
|
|
| BLAKE2b-256 |
307f1c9e0629adf0e9321a2cff6e8c096e4fa2adc8933b283d4596eb2c153345
|
Provenance
The following attestation bundles were made for agentpack_skills-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on PrakhyathS/agentpack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentpack_skills-0.1.0-py3-none-any.whl -
Subject digest:
2d427eab22fa50c322f3e6a14eb216ce5e8ff4be3193bc76ee6b3cf6d91451ed - Sigstore transparency entry: 2008642611
- Sigstore integration time:
-
Permalink:
PrakhyathS/agentpack@74dc205bfbcdad921e4268492f1da651d021bf2a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/PrakhyathS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@74dc205bfbcdad921e4268492f1da651d021bf2a -
Trigger Event:
push
-
Statement type: