export-api
Skill887 starsChanged 29 days agoMITView on GitHub
Generate api.md artifacts for changed Rust crates after code generation or source edits.
In this repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- eng/tools/generate_api/AGENTS.mdAGENTS.md
- samples/AGENTS.mdAGENTS.md
- sdk/core/AGENTS.mdAGENTS.md
- sdk/cosmos/AGENTS.mdAGENTS.md
- sdk/cosmos/azure_data_cosmos_emulator/AGENTS.mdAGENTS.md
- sdk/cosmos/docs/AGENTS.mdAGENTS.md
- agentic-workflowsSkill
- analyze-codeSkill
- check-spellingSkill
- create-crateSkill
- create-hotfixSkill
- create-perf-testSkill
- create-recorded-testSkill
- document-cratesSkill
- lint-markdownSkill
- prepare-releaseSkill
- review-doc-commentsSkill
- update-emitterSkill
- update-rustSkill
- cosmos-design-structSkill
- cosmos-pre-commit-validationSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Run this after regenerating sources or changing Rust code that can affect a crate's public API.
- Distinctive: line 18
If the user wants branch-based detection instead, diff against the merge base with main:
- Very specific: line 46
If no changed files map to a crate directory under sdk/<service-directory>/<crate-name>, stop and report that no crate API artifacts need …
- Very specific: line 51
After generation, check the resulting api.md files in git diff and report which crates were updated.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Export API artifacts
Run this after regenerating sources or changing Rust code that can affect a crate's public API.
Default workflow
Collect changed non-deleted files from Git. By default, use both staged and unstaged local changes:
{ git diff --staged --name-only --diff-filter=d; git diff --name-only --diff-filter=d; git ls-files --others --exclude-standard -- 'sdk'; } | sort -uIf the user wants branch-based detection instead, diff against the merge base with
main:base="$(git merge-base main HEAD)" git diff --name-only --diff-filter=d "$base"...HEAD | sort -uThis branch-based mode only considers tracked branch changes; use the default local-change mode when untracked files should also trigger API regeneration.
- Assume service crates live under
sdk/<service-directory>/<crate-name>. For each changed file undersdk/, derive the candidate crate directory from the first three path segments and keep it only when<crate-directory>/Cargo.tomlexists. For each affected crate, run the explicit generator command from the repository root:
cargo run --manifest-path eng/tools/generate_api/Cargo.toml -- \ --manifest-path <crate>/Cargo.toml
Optional outputs
- Pass
--reviewto also generateapi.metadata.yml,api.md.map, andapi.documentation.patch.
No changed crates
If no changed files map to a crate directory under sdk/<service-directory>/<crate-name>, stop and
report that no crate API artifacts need regeneration.
Validation
After generation, check the resulting api.md files in git diff and report which crates were
updated.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

