extracting-ai-context
Extracts and manages AI context (skills, AGENTS.md) from workflow-kotlin library JARs. Use when setting up AI tooling for a workflow-kotlin project, updating skills after a library version change, or configuring agent-specific directories.
Best use case
extracting-ai-context is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Extracts and manages AI context (skills, AGENTS.md) from workflow-kotlin library JARs. Use when setting up AI tooling for a workflow-kotlin project, updating skills after a library version change, or configuring agent-specific directories.
Teams using extracting-ai-context should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/extracting-ai-context/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How extracting-ai-context Compares
| Feature / Agent | extracting-ai-context | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Extracts and manages AI context (skills, AGENTS.md) from workflow-kotlin library JARs. Use when setting up AI tooling for a workflow-kotlin project, updating skills after a library version change, or configuring agent-specific directories.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Extracting AI Context from workflow-kotlin
Manages the extraction of version-matched AI skills and AGENTS.md context from
workflow-kotlin library JARs into the correct locations for your AI coding agent.
## Prerequisites
The project must apply the workflow-kotlin AI context Gradle plugin:
```groovy
// build.gradle / build.gradle.kts
plugins {
id("com.squareup.workflow1.ai-context") version "<workflow-version>"
}
```
## Quick Start
Run the extraction task — this is the primary command:
```bash
./gradlew extractAiContext
```
This extracts all skills to `.agents/skills/` and merges workflow-kotlin guidance
into `AGENTS.md`. This works out of the box for **Amp, Cursor, Codex, GitHub Copilot,
Gemini CLI, and OpenCode**.
## Agent-Specific Setup
### Claude Code Users
Claude Code uses `.claude/skills/` instead of `.agents/skills/`. To support both:
```bash
./gradlew extractAiContext --tools=amp,claude-code
```
Then create a `CLAUDE.md` symlink so Claude Code picks up the guidance:
```bash
ln -sf AGENTS.md CLAUDE.md
echo "CLAUDE.md" >> .gitignore
```
### Other Agents
The `--tools` flag accepts any agent name from the Agent Skills standard.
Common options:
| Agent | Flag | Skills Directory |
|---|---|---|
| Amp, Cursor, Codex, Copilot, Gemini CLI | `amp` (default) | `.agents/skills/` |
| Claude Code | `claude-code` | `.claude/skills/` |
| Goose | `goose` | `.goose/skills/` |
| Windsurf | `windsurf` | `.windsurf/skills/` |
| Roo Code | `roo` | `.roo/skills/` |
Multiple agents: `--tools=amp,claude-code,goose`
## What Gets Extracted
### Skills
Version-matched skills from workflow-kotlin JARs on your classpath:
- **create-workflow** — Creating StatefulWorkflow and StatelessWorkflow classes
- **workflow-testing** — Unit testing with testRender / RenderTester
- **workflow-integration-testing** — Integration testing with renderForTest / WorkflowTurbine
- **extracting-ai-context** — This skill (self-referential for future re-runs)
### AGENTS.md
The root workflow-kotlin project guide is merged into your `AGENTS.md` using
injection markers. Your existing content is preserved — the injected block is
clearly delimited:
```
<!-- workflow-kotlin-AGENTS-injection:START -->
... workflow-kotlin guidance ...
<!-- workflow-kotlin-AGENTS-injection:END -->
```
## Updating After a Version Bump
When you update your workflow-kotlin dependency version, re-run the extraction
to get version-matched skills and guidance:
```bash
./gradlew extractAiContext
```
The injection markers in `AGENTS.md` ensure the old content is cleanly replaced.
Skills in `.agents/skills/` are overwritten with the new versions.
## Preview Mode
See what would be extracted without writing files:
```bash
./gradlew extractAiContext --preview
```
## Gitignore
Add extracted skill directories to `.gitignore` since they're generated from JARs:
```gitignore
# Extracted AI context (generated by extractAiContext task)
.agents/skills/create-workflow/
.agents/skills/workflow-testing/
.agents/skills/workflow-integration-testing/
.agents/skills/extracting-ai-context/
```
Do NOT gitignore `AGENTS.md` — it contains your project-specific content
alongside the injected workflow-kotlin block.
## Troubleshooting
### No skills extracted
- Verify the plugin is applied: check for `com.squareup.workflow1.ai-context` in your build file
- Ensure workflow-kotlin dependencies are on the classpath (e.g., `workflow-core`, `workflow-testing`)
- Run with `--info` for verbose output: `./gradlew extractAiContext --info`
### Skills are outdated
- Re-run `./gradlew extractAiContext` after updating your workflow-kotlin version
- Check that Gradle resolved the new version: `./gradlew dependencies | grep workflow`Related Skills
create-agent-with-sanity-context
Build AI agents with structured access to Sanity content via Context MCP. Covers Studio setup, agent implementation, and advanced patterns like client-side tools and custom rendering.
context-optimizer
Analyzes Copilot Chat debug logs, agent definitions, skills, and instruction files to audit context window utilization. Provides log parsing, turn-cost profiling, redundancy detection, hand-off gap analysis, and optimization recommendations. Use when optimizing agent context efficiency, identifying where to add subagent hand-offs, or reducing token waste across agent systems.
context-fundamentals
Understand the components, mechanics, and constraints of context in agent systems. Use when designing agent architectures, debugging context-related failures, or optimizing context usage.
context-engineering
Use when designing agent system prompts, optimizing RAG retrieval, or when context is too expensive or slow. Reduces tokens while maintaining quality through strategic positioning and attention-aware design.
context-degradation
Recognize patterns of context failure: lost-in-middle, poisoning, distraction, and clash
context-assembler
Assembles relevant context for agent spawns with prioritized ranking. Ranks packages by relevance, enforces token budgets with graduated zones, captures error patterns for learning, and supports configurable per-agent retrieval limits.
Codebase context
Create a lightweight codebase_context.md that anchors the idea in the existing repo (modules, constraints, extension points). Generic framework prompt.
agent-context-system
A persistent local-only memory system for AI coding agents. Two files, one idea — AGENTS.md (committed, shared) + .agents.local.md (gitignored, personal). Agents read both at session start, update the scratchpad at session end, and promote stable patterns over time. Works across Claude Code, Cursor, Copilot, Windsurf. Subagent-ready. No plugins, no infrastructure, no background processes.
add-route-context
为Flutter页面添加路由上下文记录功能,支持日期等参数的AI上下文识别。当需要让AI助手通过"询问当前上下文"功能获取页面状态(如日期、ID等参数)时使用。适用场景:(1) 日期驱动的页面(日记、活动、日历等),(2) ID驱动的页面(用户详情、订单详情等),(3) 任何需要AI理解当前页面参数的场景
localsetup-context
Localsetup v2 framework context - overview, invariants, and skills index. Load first when working in a repo that uses Localsetup v2. Use when starting work in this repo or when user asks about framework rules.
context7-skills
Use when a user asks to search, install, list, or remove skills with the Context7 ctx7 skills CLI (including npx ctx7) and needs correct subcommands or client flags.
cli-context
Explains the CLI app architecture and capabilities. Use when working on CLI features, debugging CLI issues, or needing to understand the TTS pipeline, emotion annotation, or command flags.