ac-code-generation-and-apis
Generating code as a managed part of the system: codegen as a build step and its ownership, type generation from schemas and the drift it prevents, API client generation and what the generated surface promises, database query and model generation, configuration and bindings generation, reviewing generated code without rewriting it, and the written codegen record. It explains how generation is wired and kept honest; it never recommends a generator and never promises correctness from generation alone. Use when asking "code generation", "codegen", "generated client", "openapi to typescript", "type generation", "scaffold", "protobuf types", "generated code drift", "should I edit generated files", "golden file". Not for writing the code by hand (ac-code-construction), not for build graph and caching mechanics (ac-monorepo-and-build-systems), not for API contract design itself (ac-api-design).
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 81
- Forks
- 17
01 前言 Front Matter
- name
- ac-code-generation-and-apis
- status
- seedling
- license
- MIT
- metadata
- { "domain": "software-engineering" }
- description
- Generating code as a managed part of the system: codegen as a build step and its ownership, type generation from schemas and the drift it prevents, API client generation and what the generated surface promises, database query and model generation, configuration and bindings generation, reviewing generated code without rewriting it, and the written codegen record. It explains how generation is wired and kept honest; it never recommends a generator and never promises correctness from generation alone. Use when asking "code generation", "codegen", "generated client", "openapi to typescript", "type generation", "scaffold", "protobuf types", "generated code drift", "should I edit generated files", "golden file". Not for writing the code by hand (ac-code-construction), not for build graph and caching mechanics (ac-monorepo-and-build-systems), not for API contract design itself (ac-api-design).
02 资源文件 10
- 许可证LICENSE1.0 KB
- 参考文档SOURCE.md383 B
- 参考文档subskills/client-generation.md3.2 KB
- 参考文档subskills/codegen-as-build-step.md3.1 KB
- 参考文档subskills/codegen-record.md3.0 KB
- 参考文档subskills/config-bindings-generation.md3.2 KB
- 参考文档subskills/database-model-generation.md3.1 KB
- 参考文档subskills/reviewing-generated-code.md3.0 KB
- 参考文档subskills/type-generation.md3.2 KB
- 参考文档TRUST.auto.yaml2.2 KB
03 SKILL.md 正文
Code generation and APIs
Overview
Generated code is written by a program from a source of truth — a schema, a contract, a database, a configuration — and its defining property is that a human did not write it and should not edit it. The craft is not in the generation itself but in the wiring around it: what the generator reads, when it runs, what it owns, how its output is checked, and how drift between the source of truth and the artifacts is prevented or at least detected.
This skill covers that wiring. It treats codegen as a build dependency with an owner and a failure mode, covers type and client generation from API contracts, database-driven generation, and configuration bindings, and addresses the recurring question of how generated code is reviewed without being rewritten. The design of the API contract itself belongs elsewhere; this is about what the contract mechanically produces.
Primary source: https://www.openapis.org/.
When to use
- When adding or changing a code generation step in a build.
- When generated types or clients drift from their source of truth.
- When deciding whether to edit, wrap, or regenerate output.
- When reviewing a change that includes generated artifacts.
When NOT to use
- For hand-written code craft (use ac-code-construction).
- For build graph and caching mechanics (use ac-monorepo-and-build-systems).
- For the design of the API contract (use ac-api-design).
Subskill Index
| Leaf | Domain segment | Scope (one line) |
|---|---|---|
subskills/codegen-as-build-step.md |
software-engineering/codegen-as-build-step |
Inputs, outputs, freshness, and who owns the step. |
subskills/type-generation.md |
software-engineering/type-generation |
Deriving types from schemas and detecting drift. |
subskills/client-generation.md |
software-engineering/client-generation |
Generated API clients and what their surface promises. |
subskills/database-model-generation.md |
software-engineering/database-model-generation |
Generating query and model layers from the database. |
subskills/config-bindings-generation.md |
software-engineering/config-bindings-generation |
Typed configuration from schema to binding. |
subskills/reviewing-generated-code.md |
software-engineering/reviewing-generated-code |
Reviewing output without owning it by hand. |
subskills/codegen-record.md |
software-engineering/codegen-record |
The written record of generators and their contracts. |
Status and honest limits
Generators move faster than the systems around them, and a generated artifact that was correct when generated is only as correct as its input was current. This skill holds the wiring stable, not the tools; flag names and plugin ecosystems change. Nothing here recommends a generator, and generation guarantees shape, never behaviour — a type generated from a schema says the field exists, not that the value is right.
04 同仓库更多 Skills
troves
Deposit and withdraw from Troves DeFi yield vault strategies on Starknet. View available strategies, check positions, and manage vault deposits. Use this skill when the user mentions Troves, vault, yield vault, DeFi vault, strategy, yield farming, vault deposit, vault withdraw, earning yield through vaults, passive yield strategies, or wants to deposit into or withdraw from a yield strategy — even if they don't say "Troves" explicitly.
trade
Swap tokens on Starknet via Fibrous DEX aggregator. Supports per-provider selection (avnu, ekubo, or auto to race all). Use this skill when the user wants to swap, exchange, trade, convert, buy, or sell one token for another on Starknet. Also use when the user asks about token prices, exchange rates, DEX routing, best swap route, or wants to check how much they would receive for a given amount — even if they don't explicitly say "swap".
staking
Stake, unstake, claim, and compound rewards for STRK, WBTC, tBTC, SolvBTC, and LBTC on Starknet. View validators, pools, and staking positions. Use this skill when the user mentions staking, delegating, validators, staking pools, rewards, compounding, unstaking, earning yield, passive income on crypto, or wants to earn on their STRK or BTC tokens — even if they don't say "stake" explicitly.
send
Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say "pay 10 STRK to 0x...".
portfolio
View a comprehensive DeFi portfolio dashboard and optimize portfolio allocation via automated rebalancing. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, portfolio rebalancing, target allocation, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks "what do I have", "show me everything", "how much am I worth", "my positions", "my investments", "rebalance my portfolio", "I want 50% ETH", "optimize my holdings", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say "portfolio".
multi-swap
Execute multiple token swaps in a single Starknet transaction via Fibrous (default). Supports per-provider selection (avnu, ekubo, or auto to race all). Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions "two swaps", "three swaps", "swap X and Y at the same time", or wants to convert multiple tokens in a single call.