Agent prompt
Three things that say “agent”
The skill is the one to install first. It needs no server, no config file and no restart.
The pack-writing skill
Twelve packs will not cover the API you use. A pack is declarations, so an agent that knows the rules can write one for whatever you use, and the conformance suite gates the result. The skill is those rules, as one markdown file..claude/skills/ inside the repo, so it travels with the code and your teammates get it from a checkout. It is a document, not a package: you can also open the file and paste it into whatever your agent reads.
The skill is deliberately not delivered through Charter’s MCP server. The server serves tools at runtime; the skill is guidance at authoring time, often on a different machine and always at a different moment. Bundling them would put a server install, a config edit and a restart in front of a file you can
curl.What it makes the agent do
The skill is a checklist, in order, and the order is the point.Crawl every linked page before modelling anything
Crawl every linked page before modelling anything
One endpoint routinely spans ten documentation pages: the request body references a resource, the resource references an enum, the enum’s values are documented somewhere else. Miss one enum value and the model will eventually emit it and earn a 400 you cannot reproduce.This is the step an agent skips if you do not tell it not to, and it is the one that decides whether the pack is right.
Use the reference page's words, and put your own in a Gloss
Use the reference page's words, and put your own in a Gloss
Each field’s description is the vendor’s own sentence, copied rather than summarised, so the declaration can be read against the page it came from.Anything the agent wants to add, a unit, a conversion, a value the API reads as something else, goes in a
Gloss. It is appended to the description the model reads and absent from the wire schema, so the vendor’s text stays diffable against their page. Left in the description instead, the pack’s sentence and the vendor’s become one string, and the next regeneration from the docs deletes the help without anyone seeing it go.Mark every field's place in the request
Mark every field's place in the request
Path(), Query(), Body(); see the wire contract. An unmarked top-level field is refused rather than guessed, so a pack that skips this fails on its first call rather than silently sending a field to the wrong place.Set the casing once, on the factory
Set the casing once, on the factory
Not per field. The key case cascade has four levels, and picking the widest one that is true keeps the declaration honest as the pack grows.
Pick the transforms
Pick the transforms
Where the API wants a wire format and the model should speak meaning: MIME, base64url, protobuf
Value. See transforms.Declare failure that HTTP 200 hides
Declare failure that HTTP 200 hides
An
Envelope on the factory, never logic inside a response handler. This is the rule with the sharpest consequence: a handler-level check is opt-in per tool, so the first tool somebody adds without one reports a failed write as a success.Test it offline
Test it offline
Every HTTP interaction mocked. A pack whose tests reach the network is a pack whose tests will fail for reasons that have nothing to do with the pack.
Then check it mechanically
The skill gets the shape right. The conformance suite proves it: nineteen properties that must hold for every pack, checked without knowing anything about any particular API, and each one verified against a pack broken on purpose so the check cannot go vacuous. That pairing is the whole idea. Guidance makes a stranger’s pack come out in the right shape, and a gate that does not care whether the stranger read the guidance holds it there.These docs as a source
Charter is new enough that a model’s training data is unreliable about it. Pointing an agent at the live docs costs one fetch and removes a whole class of confident wrong answer.https://docs.r28.ai/charter/llms.txtlists every page with its description. Fetch it first to discover what exists.- Append
.mdto any URL for the page as markdown, with no navigation to strip:https://docs.r28.ai/charter/tools/wire-contract.md. - The menu beside every page title opens the page in ChatGPT or Claude, or connects this site as an MCP server to Cursor or VS Code.
For authoring, the skill beats the docs. It is the rules in the order they have to be applied, rather than a reference an agent has to assemble an approach from.
A rule worth giving your agent
Charter describes one request. It ships no agent loop, no pagination loop and no retry policy, and it never obtains an OAuth grant. An agent that assumes otherwise will write plausible code against an API that does not exist. Limitations is the page that prevents it, and it is worth putting in front of a model before it writes anything substantial. A second rule, for an agent assembling a tool surface rather than writing a pack: a pack tool models its whole endpoint, and a few of them are wide.gsheets.spreadsheets_batch_update is 52,168 tokens of schema, because Sheets puts 74 kinds of edit behind one method. Narrow it with Tool.derived instead of dropping the tool or writing a thinner one by hand.
Related
- Writing packs, the source file
- Packs, the eleven that ship, as worked examples
- Conformance, what your pack will be held to
- MCP server, for an agent that needs the tools rather than the rules
- Projections, for narrowing a wide tool to what one agent may do