Flywheel

Analyze recent session transcripts for user-correction patterns and propose agent/steering/skill configuration improvements. Use when asked to run the flywheel, improve agent configuration, or learn from past sessions.

43 stars 9 forksAI, LLMs & AgentsOfficial

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add aws-samples/sample-kiro-cli-multiagent-development --skill flywheel
Manual install
git clone --depth 1 https://github.com/aws-samples/sample-kiro-cli-multiagent-development.git /tmp/sample-kiro-cli-multiagent-development
mkdir -p ~/.claude/skills
cp -r /tmp/sample-kiro-cli-multiagent-development/skills/flywheel ~/.claude/skills/flywheel

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Flywheel: Agent Configuration Improvement Loop

Analyze recent sessions to identify patterns where the user had to correct, redirect, or steer the agent — then propose configuration changes to prevent recurrence.

Source of truth: the **v3 session transcripts** the engine writes for every session. No separate index
files or hooks are needed — parse the transcripts directly.

## Process

### Phase 1: Session Analysis

1. **Locate recent sessions.** v3 stores each session under `~/.kiro/sessions/<hash>/sess_<uuid>/` with
   two files:
   - `session.json` — metadata: `id`, `title`, `agentMode` (which agent ran), `modelId` (the model),
     `workspacePaths` (cwd), `createdAt`/`lastModifiedAt`, `status`, `description`.
   - `messages.jsonl` — the transcript; one JSON object per line, each with a `payload.type`:
     - `user` → `payload.content` is the user's prompt
     - `assistant` → `payload.content` is the agent's response (`operationType: "Say"` for text)
     - `turn_start` → marks the start of a turn (`executionId`)
     - `session_metadata` → e.g. context-usage samples
   List sessions by `lastModifiedAt` descending; analyze the ~10 most recent (or a date range the user
   specifies).
2. **Scan for correction events** by reading each `messages.jsonl` and examining every `user` message
   (in sequence with the `assistant` messages around it). A correction event is a user message that
   signals the agent did something wrong or suboptimal:
Read the full skill on GitHub

Details

Skill name
flywheel
Path
skills/flywheel/SKILL.md
License
MIT-0
Repo updated
9 September 2026

FAQ

What does the Flywheel skill do?

Analyze recent session transcripts for user-correction patterns and propose agent/steering/skill configuration improvements. Use when asked to run the flywheel, improve agent configuration, or learn from past sessions.

How do I install the Flywheel skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add aws-samples/sample-kiro-cli-multiagent-development --skill flywheel. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Flywheel popular?

It lives in aws-samples/sample-kiro-cli-multiagent-development, which has 43 GitHub stars and 9 forks.

Related skills

Agentcore Patterns

43

aws-samples/sample-kiro-cli-multiagent-development

Verified Amazon Bedrock AgentCore patterns for Runtime handlers, Gateway MCP clients with SigV4/IAM auth, Memory session management with Strands, and Bedrock cross-region inference-profile IAM policies. Use when building or debugging AgentCore-based agents.

AI, LLMs & Agents

AWS Technical Docs

43

aws-samples/sample-kiro-cli-multiagent-development

AWS technical documentation patterns covering procedures, lists, tables, titles, error messages, and content patterns. Use when writing AWS service documentation, procedures, troubleshooting guides, tutorials, or getting started content.

Writing & Content

CLI Execution

43

aws-samples/sample-kiro-cli-multiagent-development

CLI execution best practices covering RTK token compression, AWS discover-then-execute patterns, output control, and bash/zsh scripting with logging. Use when running CLI commands, querying AWS resources, writing automation scripts, or working with shell tooling.

Software Development

Principle Explain the Number

107

Dimon94/skills

Apply before you measure, and before you trust, report, or act on a number you measured: a speedup, a regression, a throughput, a latency, or an eval result. Find what limits it, and rule out that it measured something other than the work you think.

AI, LLMs & Agents21

Correct

107

Dimon94/skills

从仓库历史找出 agent 反复犯的错误类别,逐类在能生效的最高层级让它不可能再犯,并证明新检查会在真实旧错误上失败。用于用户显式调用 /correct 或 $correct。

AI, LLMs & Agents21

Principle Model the Domain

107

Dimon94/skills

Apply when writing stateful logic, or when code branches a lot or repeats a shape assumption across files.

AI, LLMs & Agents21

Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.