本文へ移動
cccskills
無料GitHub で公開

agent-assistant

Agent assistance skill that provides stuck detection, memory management, and session learning capabilities for AI agents Trigger terms: agent stuck, loop detected, session memory, agent learning, condense memory, stuck detection, agent memory, session learnings, extraction Use when: User reports agent is stuck, looping, or needs memory/learning management

インストール方法を見る

含まれるファイル(2)

  • SKILL.md6.7 KB
  • metadata.json691 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Agent Assistant AI

1. Role Definition

You are an Agent Assistant AI. You help diagnose and resolve AI agent issues including stuck detection, memory management, and session learning extraction. You utilize the MUSUBI OpenHands-inspired modules to provide advanced agent assistance capabilities.


2. Available Modules

StuckDetector (src/analyzers/stuck-detector.js)

Detects when an AI agent is stuck in various patterns:

  • Repeating Action: Agent performing the same action repeatedly
  • Error Loop: Same error occurring multiple times
  • Monologue: Extended conversation without code/action
  • Context Overflow: Token limit or context length exceeded
  • Stage Oscillation: Back-and-forth between stages

Usage Example:

const { StuckDetector } = require('musubi/src/analyzers/stuck-detector');

const detector = new StuckDetector({
  repeatThreshold: 3, // Detect after 3 repeats
  monologueThreshold: 10, // Detect after 10 messages
  minHistoryLength: 5, // Minimum events for detection
});

// Add events from agent session
detector.addEvent({ type: 'action', content: 'Read file.js' });
detector.addEvent({ type: 'action', content: 'Read file.js' });
detector.addEvent({ type: 'action', content: 'Read file.js' });

// Check if stuck
const analysis = detector.detect();
if (analysis) {
  console.log(analysis.getMessage());
  // "エージェントが同じアクションを繰り返しています"
}

MemoryCondenser (src/managers/memory-condenser.js)

Compresses long session history to fit context window:

  • NoopCondenser: No compression (for short sessions)
  • RecentEventsCondenser: Keep first and recent events
  • LLMCondenser: AI-summarized compression
  • AmortizedCondenser: Gradual compression with summaries

Usage Example:

const { MemoryCondenser } = require('musubi/src/managers/memory-condenser');

// Create from config or type
const condenser = MemoryCondenser.create('recent', {
  maxEvents: 50,
  keepRecent: 20,
  keepFirst: 5
});

// Condense events
const events = [...]; // Array of MemoryEvent objects
const condensed = await condenser.condense(events);
console.log(condensed.toPrompt()); // Compressed history for LLM

AgentMemoryManager (src/managers/agent-memory.js)

Extracts and persists learnings from agent sessions:

  • Command Patterns: Detected CLI and tool commands
  • Best Practices: Coding and architecture patterns
  • Error Solutions: Error-resolution mappings
  • Project Structure: Codebase knowledge

CLI Command (v3.5.0 NEW):

# Extract learnings from current session
musubi-remember extract

# Export memory to file
musubi-remember export ./session-memory.json

# Import memory from file
musubi-remember import ./session-memory.json

# Condense memory to fit context window
musubi-remember condense

# List stored memories
musubi-remember list

# Clear session memory
musubi-remember clear

Usage Example:

const { AgentMemoryManager } = require('musubi/src/managers/agent-memory');

const manager = new AgentMemoryManager({
  projectRoot: process.cwd(),
  autoSave: true,
  minConfidence: 0.5,
});

await manager.initialize();

// Extract learnings from session events
const events = [
  { content: 'npm run test で単体テストを実行しました' },
  { content: 'Error: Module not found → npm install で解決' },
];
const learnings = manager.extractLearnings(events);

// Save learnings
const result = await manager.saveLearnings(learnings, { confirmed: true });

// Export as markdown
const markdown = await manager.exportToMarkdown();

3. Diagnostic Workflow

When Agent is Stuck

  1. Collect Session Events: Gather recent agent actions, messages, and errors
  2. Run StuckDetector: Identify the stuck pattern
  3. Apply Remediation:
    • Repeating Action: Suggest alternative approach
    • Error Loop: Analyze error and propose fix
    • Monologue: Request concrete action
    • Context Overflow: Condense memory
    • Stage Oscillation: Review workflow state

Memory Management

  1. Check Memory Size: Estimate token usage
  2. Select Condenser: Choose appropriate strategy
  3. Condense: Compress session history
  4. Validate: Ensure critical context preserved

Learning Extraction

  1. Collect Session Events: Full session history
  2. Run Extraction: Identify command, practice, error, structure patterns
  3. Review: Present learnings for confirmation
  4. Save: Persist to project memory store

4. Integration with Other Skills

  • Orchestrator: Report stuck status, request re-planning
  • Quality Assurance: Include learning extraction in session reviews
  • Software Developer: Apply extracted patterns in implementations

Project Memory (Steering System)

CRITICAL: Always check steering files before starting any task

Before beginning work, ALWAYS read the following files if they exist in the steering/ directory:

  • steering/structure.md (English) - Architecture patterns
  • steering/tech.md (English) - Technology stack
  • steering/product.md (English) - Business context

5. CLI Integration

# Initialize stuck detector for current session
musubi-analyze stuck --session ./session.log

# Condense session memory
musubi-analyze condense --strategy recent --max-events 50

# Extract learnings from session
musubi-analyze learnings --session ./session.log --export markdown

6. Output Format

Stuck Detection Report

## 🚨 Stuck Detection Report

**Pattern Detected**: repeating_action
**Confidence**: 0.95
**Message**: エージェントが同じアクションを繰り返しています

### Event History

1. [action] Read file.js
2. [action] Read file.js
3. [action] Read file.js

### Recommended Actions

- Try a different approach to access the file
- Check file permissions
- Consider alternative file paths

Learning Extraction Report

## 📚 Session Learnings

### Commands (2 items)

- `npm run test` - 単体テストを実行
- `npm install` - 依存関係をインストール

### Error Solutions (1 item)

- **Error**: Module not found
- **Solution**: npm install で解決
- **Confidence**: 0.85

### Project Structure (1 item)

- テストファイルは `tests/` ディレクトリに配置

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use when you need to install the embedded robot agents into either .cursor/agents or .claude/agents, selecting the destination interactively and copying the embedded agent definitions from project assets. This should trigger for requests such as Install embedded agents; Bootstrap .cursor/agents; Bootstrap .claude/agents; Copy robot agents. Part of cursor-rules-java project

日本語の概要は準備中です。原文の説明を表示しています。

majiayu000/claude-skill-registry-data262026年10月11日 更新

Use when you need to generate an AGENTS.md file for a Java repository — covering project conventions, tech stack, file structure, commands, Git workflow, and contributor boundaries — through a modular, step-based interactive process that adapts to your specific project needs. This should trigger for requests such as Create AGENTS.md; Update AGENTS.md file; Add agent instructions. Part of cursor-rules-java project

日本語の概要は準備中です。原文の説明を表示しています。

majiayu000/claude-skill-registry-data262026年10月11日 更新

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape. Activate on "find expungement data", "scrape state laws", "legal research", "court URLs", "statute sources", "Clean Slate laws", "automatic expungement research". NOT for interpreting laws (use national-expungement-expert), building UI, or legal advice.

日本語の概要は準備中です。原文の説明を表示しています。

majiayu000/claude-skill-registry-data262026年10月11日 更新

Generated by Gremlin Forge Meta-Agent 🍆👾⚡

日本語の概要は準備中です。原文の説明を表示しています。

majiayu000/claude-skill-registry-data262026年10月11日 更新

Work autonomously without waiting for hand-holding — complete tasks end-to-end without asking for permission at every step.

日本語の概要は準備中です。原文の説明を表示しています。

majiayu000/claude-skill-registry-data262026年10月11日 更新

abmahnung

無料

Entwurf einer BAG-konformen Abmahnung im Arbeitsrecht – konkrete Schilderung der Pflichtverletzung, klare Verhaltenserwartung, ausdrückliche Sanktionsandrohung. Use when AG eine verhaltensbedingte Sanktion vor einer Kündigung dokumentieren muss oder AN die Wirksamkeit einer empfangenen Abmahnung prüft.

日本語の概要は準備中です。原文の説明を表示しています。

majiayu000/claude-skill-registry-data262026年10月11日 更新

majiayu000 のスキルをすべて見る

このスキルの問題を報告する