AgentSkillsCN

juliaz-agent-improve

通过性能分析、提示工程与验证,系统性地提升Julia智能体的表现。每当需要优化某智能体的行为——无论是调度器、前端Julia、OpenClaw中继,还是任何子智能体——都可触发此技能。此外,还可针对“提升智能体表现”“智能体运行不佳”“优化提示”“工具使用不正确”“Julia给出错误答案”,或任何与智能体质量相关的问题触发。

SKILL.md
--- frontmatter
name: juliaz-agent-improve
description: "Systematic improvement of Julia's agents through performance analysis, prompt engineering, and validation. Trigger when optimizing any agent's behavior — orchestrator, frontend Julia, OpenClaw relay, or any sub-agent. Also trigger for: 'improve agent', 'agent not working well', 'optimize prompt', 'tool not being used correctly', 'Julia gives wrong answers', or any agent quality issue."

juliaz-agent-improve — Agent Performance Optimization

Systematic improvement of agents in the juliaz_agents system. Adapted from agent-orchestration-improve-agent.

Use this skill when

  • Improving an existing agent's performance or reliability (orchestrator, frontend Julia, OpenClaw)
  • Analyzing why an agent misuses tools, gives wrong answers, or fails silently
  • Optimizing system prompts for better tool selection
  • Validating agent changes before deployment

Do not use this skill when

  • Building a brand-new agent from scratch (use juliaz-agent-builder)
  • Adding a new tool (use juliaz-tool-builder)
  • Debugging infrastructure issues (use juliaz-debug)

Methodology: 4-Phase Improvement Cycle

Phase 1: Baseline & Failure Analysis

Before changing anything, establish what's broken and what works.

  1. Identify the failure: What exact prompt/input causes the wrong behavior?
  2. Trace the path: Which agent handles it? What tools does it have? What does its system prompt say?
  3. Check logs: pm2 logs orchestrator, pm2 logs bridge, browser console for frontend
  4. Classify the failure:
    • Tool misuse: Agent calls wrong tool or doesn't call any tool → fix tool descriptions
    • Prompt gap: Agent doesn't know about a capability → fix system prompt
    • Missing tool: Agent literally can't do what's asked → add a tool (use juliaz-tool-builder)
    • Architecture gap: No path exists between components → fix routing (use juliaz-multi-agent-optimize)

Phase 2: Targeted Fix

Apply the minimum change needed:

  • Tool description fix: Make descriptions crystal-clear about WHEN to use, WHEN NOT to use, and WHAT inputs to provide (see juliaz-tool-builder)
  • System prompt fix: Add missing capabilities, clarify boundaries, add examples
  • Routing fix: Add missing connections between components

Phase 3: Validation

Test the exact failure case that motivated the change:

  1. Re-run the failing prompt → should now succeed
  2. Run regression prompts → existing behavior unchanged
  3. Check for hallucinated tool calls → agent shouldn't call tools for unrelated prompts
  4. Check logs for errors → no silent failures

Phase 4: Document

  • Update the agent's system prompt version comment
  • Note the fix in thesis documentation if substantive

juliaz-Specific Failure Patterns

SymptomLikely CauseFix
"I can't do that"Missing tool or unclear promptAdd tool or update prompt
Tool called but wrong resultTool implementation bugFix the executor in tools.ts
Tool never calledVague tool descriptionRewrite description per juliaz-tool-builder
Agent calls wrong toolOverlapping/ambiguous descriptionsMake descriptions mutually exclusive
Timeout on tool callService down or wrong URLCheck bridge/backend/cowork-mcp health
Generic/unhelpful responseSystem prompt too vagueAdd specific guidance and examples

Key Files

AgentPromptToolsExecutor
Orchestrator Juliaorchestrator/src/prompt.tsorchestrator/src/tools.tsorchestrator/src/tools.ts:executeTool()
Frontend Juliafrontend/server.ts (SYSTEM_PROMPT const)frontend/server.ts (chatTools object)Inline in tool definitions
OpenClawopenclaw/SOUL.md + skill filesOpenClaw CLI built-in + skillsSkill scripts