Get the FREE Ultimate OpenClaw Setup Guide →

summarize-session

npx machina-cli add skill lbb00/ai-rules-sync/summarize-session --openclaw
Files (1)
SKILL.md
2.9 KB

Summarize Session

Purpose

At the end of a productive coding session, analyze the conversation to extract reusable patterns and generate Claude Code artifacts (rules, skills, commands) that can accelerate future work.

Instructions

  1. Review Session Activity

    • What problems were solved?
    • What code was written or modified?
    • What workflows were performed?
    • What decisions were made and why?
  2. Identify Patterns

    Rules Candidates (coding standards, project conventions):

    • Repeated code style corrections
    • Error patterns that were fixed
    • Best practices established
    • Project-specific conventions

    Skills Candidates (multi-step workflows):

    • Complex operations performed multiple times
    • Sequences of commands that go together
    • Integration or deployment workflows
    • Testing or validation procedures

    Commands Candidates (single-action shortcuts):

    • Frequently used command combinations
    • Build/test/deploy shortcuts
    • Common git operations
    • Project-specific utilities
  3. Generate Artifacts

    For each identified pattern, create the appropriate artifact:

    Rules.claude/rules/<name>/RULE.md

    ---
    name: rule-name
    description: Brief description
    ---
    
    # Rule Name
    
    ## When to Apply
    ...
    
    ## Guidelines
    ...
    

    Skills.claude/skills/<name>/SKILL.md

    ---
    name: skill-name
    description: Brief description
    ---
    
    # Skill Name
    
    ## Instructions
    1. Step 1
    2. Step 2
    ...
    

    Commands.claude/commands/<name>.md

    # Command Name
    
    Description of what this command does.
    
    ## Steps
    1. ...
    2. ...
    
  4. Validate Artifacts

    • Ensure artifacts are general enough to be reusable
    • Remove session-specific details
    • Test that instructions are complete and actionable
  5. Document Session Summary

    • What was accomplished
    • What artifacts were generated
    • Recommendations for next session

Output Format

## Session Summary

### Accomplished
- [List of completed tasks]

### Generated Artifacts

#### Rules
- `<rule-name>`: <description>

#### Skills
- `<skill-name>`: <description>

#### Commands
- `<command-name>`: <description>

### Next Steps
- [Recommendations for future work]

Examples

Example: After Adding a New Adapter

Identified Pattern: Multi-step process for adding adapters Generated: Skill new-adapter

Example: After Fixing Multiple Type Errors

Identified Pattern: TypeScript strict mode conventions Generated: Rule typescript-conventions

Example: After Repeated Test Commands

Identified Pattern: Test-then-commit workflow Generated: Command test-and-commit

Source

git clone https://github.com/lbb00/ai-rules-sync/blob/main/.claude/skills/summarize-session/SKILL.mdView on GitHub

Overview

Summarize the current session to capture problems solved, code changes, workflows, and decisions. Then convert those insights into reusable Claude artifacts—rules, skills, and commands—so future work follows established patterns. This workflow helps ensure consistency and accelerates onboarding by codifying best practices.

How This Skill Works

Review session activity to extract patterns in three categories: Rules (coding standards), Skills (multi-step workflows), and Commands (single-action shortcuts). For each identified pattern, generate the appropriate Claude artifact using the provided templates and store it under the corresponding .claude directory. Validate artifacts for generality, remove session-specific details, and document a concise session summary.

When to Use It

  • At the end of a productive coding session.
  • When recurring problems or patterns emerge across tasks.
  • After implementing a significant feature or workflow.
  • After debugging or refactoring to codify decisions.
  • When onboarding new teammates to capture team conventions.

Quick Start

  1. Step 1: Review the session activity and identify problems solved, code changes, workflows, and decisions.
  2. Step 2: Classify patterns into Rules, Skills, and Commands, then generate artifacts using the templates.
  3. Step 3: Validate artifacts for generality, document the session summary, and commit artifacts to the repo.

Best Practices

  • Keep artifacts generic and reusable; avoid embedding session-specific data.
  • Name artifacts clearly and consistently to match the template (rule-name, skill-name, etc.).
  • Describe purpose, when to apply, and guidelines in each artifact.
  • Test instructions by walking through a representative workflow before publishing.
  • Store artifacts in version control and document session context for traceability.

Example Use Cases

  • After adding a new adapter, generated a Skill to codify integration steps.
  • After fixing multiple type errors, captured TypeScript conventions into a Rule.
  • After repeated test commands, created a Command to automate test runs.
  • After a major refactor, documented decisions and created a Skill for refactor-checklists.
  • After setting up CI/CD, codified the deployment workflow as a Rule and Command.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers