AGENT SKILL

ag-generate-context

Generate or update the project's authoritative repository context at process/context/all-context.md. Use when repo context is missing, stale, or contradicted by code.

License 许可
MIT
最近更新
2026-08-02
Stars
★ 0
Forks
0

01 前言 Front Matter

name
ag-generate-context
layer
contract
description
Generate or update the project's authoritative repository context at process/context/all-context.md. Use when repo context is missing, stale, or contradicted by code.
trigger_keywords
generate context, update context, refresh context, missing context

02 资源文件 2

03 SKILL.md 正文

Generate Context

When to Apply

Use this skill when working with ag-generate-context workflows, tasks, or system specifications.

How to Use

Refer to the workflow instructions and command references detailed below.

Output style: Follow process/development-protocols/communication-standards.md — answer-first, plain language, no unexplained jargon, TL;DR on long responses.

Use this skill to maintain process/context/all-context.md, the broad portable project knowledge layer shared by Codex and Claude. Use process/context/all-context.md as the context router before reading grouped docs.

Optional input: a package, app, feature, context group, or architectural area to refresh first.

Workflow

  1. Read references/generate-context.md for the full context contract.
  2. Determine mode:
    • Full scan when process/context/all-context.md is missing.
    • Delta update when it exists.
  3. Read process/context/all-context.md when present to identify relevant grouped context files.
  4. Inspect current repo state, active plans, feature folders, package scripts, tooling, important architecture files, and relevant process/context/**/*.md docs.
  5. Produce process/context/all-context.md PLUS process/context/{group}/all-{group}.md for each detected or approved group (see Invocation Modes below).
  6. Include scan timestamp, repo HEAD if available, changes since last update, open questions, and source references.
  7. Validate the generated context:
    node .claude/skills/ag-generate-context/scripts/validate-all-context.mjs
    
  8. If routing or grouped context changed, also run:
    node .claude/skills/ag-audit-context/scripts/validate-context-discovery.mjs
    

Rules

  • Treat process/context/ as durable cross-agent knowledge.
  • Treat process/context/all-context.md as the durable routing protocol; do not replace it with generated prose.
  • Do not store agent-specific mechanics here unless they affect project workflow.
  • Do not rewrite grouped context docs; if they are stale or mis-grouped, flag audit-context.
  • Prefer concise, factual, path-specific documentation.
  • Use pnpm terminology for package management.
  • Treat validation failures as blockers before presenting context as refreshed.

Invocation Modes

Mode Trigger Group-detection Output
setup-delegation Called by ag-setup passing an approved-groups list Skip re-detection; use the list provided all-context.md + all-{group}.md for each approved group
standalone-full Direct invocation with no groups list Self-detect groups via the detection table in references/generate-context.md all-context.md + all-{group}.md for all detected groups
delta Invoked when context already exists; update context Self-detect; create MISSING groups only; warn on unrecognized; never delete all-context.md updated + any new all-{group}.md files created

See references/generate-context.md for per-mode instructions, the Context Group Detection Table, and delta-mode group-creation rules.

References

04 同仓库更多 Skills

ngxccc
ngxccc/agent-skills-kit

zustand

Rules and standards for state management using Zustand in React and Next.js. Use when implementing client-side stores, persistence with localStorage, or preventing SSR hydration mismatch.

★ 0
ngxccc
ngxccc/agent-skills-kit

zod

Zod v4 schema validation best practices. Use when defining schemas, utilizing safeParse, or customizing error messages.

★ 0
ngxccc
ngxccc/agent-skills-kit

upstash-ratelimit

Rules, standards, and references for rate limiting in serverless environments using Upstash Ratelimit. Use when implementing rate limiting, configuring Upstash Redis, or handling request blocking.

★ 0
ngxccc
ngxccc/agent-skills-kit

ui-design

UI/UX and frontend design best practices guidelines (formerly frontend-design). This skill should be used when writing, reviewing, or designing frontend code to ensure accessibility, performance, and usability. Triggers on tasks involving HTML structure, CSS styling, responsive layouts, form design, animations, or accessibility improvements.

★ 0
ngxccc
ngxccc/agent-skills-kit

typescript

TypeScript performance, tsconfig, type errors, async patterns — triggered when the user asks to "optimize TypeScript performance", "speed up tsc compilation", "configure tsconfig.json", "fix type errors", "improve async patterns", or encounters TS errors (TS2322, TS2339, "is not assignable to"). Also triggers on .ts, .tsx, .d.ts file work involving type definitions, module organization, or memory management. Does NOT cover TypeScript basics, framework-specific patterns, or testing.

★ 0
ngxccc
ngxccc/agent-skills-kit

typescript-refactor

TypeScript and TSX refactoring and modernization guidelines from a principal specialist perspective, current to TypeScript 6.0 and React 19. This skill should be used when refactoring, reviewing, or modernizing TypeScript or React/TSX code for type safety, compiler performance, and idiomatic patterns. Triggers on tasks involving type architecture, narrowing, generics, discriminated unions, error handling, React component and hook typing, or migration to modern TypeScript features (satisfies, using, const type parameters, inferred type predicates, isolatedDeclarations, erasable syntax, import attributes).

★ 0