⚡

智能代码调试与修复规范

ultra-agent-stinct · vv1.2.0
入口已确认,内容待校验 文件树里有 SKILL.md,但正文还没采回,frontmatter 未核对。
开发 安全 S+ 级 作者 grimmjoww 公开目录收录
3.6k 下载 915 安装 13.7k 收藏 91.7k 浏览

简介

来自个人开发者的 Claude Code 调试规范,提供系统化错误排查、代码修复流程,强调先验证后提交的安全开发原则。

原始描述

Autonomously handle coding tasks including writing, debugging, refactoring, testing, and git operations upon user request.

通过你的 Agent 添加

安装目录:ultra-agent-stinct/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/ultra-agent-stinct/
Codex CLI~/.codex/skills/ultra-agent-stinct/
DeepSeek Harness~/.agents/skills/ultra-agent-stinct/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

Ultra Agent Stinct 是专为 Claude Code Agent 设计的内部调试指导规范,旨在当代码出现错误、构建失败或异常行为时提供标准化的修复流程。该技能采用被动触发机制,当 Agent 遇到技术障碍时自动激活,提供从快速修复到完整工作流的多层级解决方案。

核心工作流包括七个标准化步骤:重现问题→解析错误堆栈→读取相关代码→追踪根本原因→实施最小化修复→验证修复效果→向用户报告。除调试外,还涵盖新代码编写、测试运行、Git 操作和复杂任务委托等场景的最佳实践,并附带跨平台命令速查表。

显著优点

该技能最大优势在于其纯文档属性带来的绝对安全性,无代码执行风险却提供了企业级的开发规范。文档反复强调安全底线原则:禁止未经阅读的编辑操作、禁止擅自执行删除或推送、强制要求修复后验证,有效培养开发者的防御性编程习惯。

流程设计体现高度工程化思维,明确区分"快速修复"与"完整工作流"的适用边界,避免过度工程化。提供的跨平台命令参考(macOS/Linux/Windows)显著降低多环境开发的心智负担。对大型任务建议启用背景 Agent 的机制,体现了对资源管理和任务复杂度的深刻理解。

潜在局限性

作为 T3 来源的个人项目,缺乏官方组织背书和社区广泛验证是其主要短板。文档虽详尽但本质为操作指南,实际效果高度依赖使用者的判断力——何时启动完整工作流、如何界定"复杂问题"仍需经验支撑。

部分建议(如 process 工具调用)可能依赖特定 Claude Code 版本支持,通用性受限。Git 操作建议虽安全但较为保守,在自动化 CI/CD 场景中可能需要额外适配。此外,文档针对 Claude 生态优化,对其他 AI 编程助手的直接适用性有限。

目标用户群体

主要面向使用 Claude Code 进行专业开发的软件工程师,特别是需要规范化调试流程的技术团队。对缺乏系统性错误排查经验的新手开发者具有极高教育价值,可帮助建立良好的调试习惯。跨平台开发者也能从中获得实用的环境适配指导。

适合在代码审查、紧急 Bug 修复、技术债务清理等场景下作为标准操作手册使用。对于追求开发流程标准化、重视代码安全性的团队,该技能可作为内部开发规范的重要参考。

使用风险提醒

尽管文档本身无执行风险,但需警惕对示例代码的误用。文中 exec 命令示例均为 Claude 工具语法,若被误解为系统原生命令可能导致操作失败。Git 相关建议(如分支保护、提交前确认)需要与实际团队权限策略对齐,过度依赖文档建议可能影响自动化工作流效率。

在大型重构场景中,文档建议创建分支或 stash,但这需要用户主动执行,Agent 本身不会自动创建备份。跨平台命令速查表虽便利,但不同系统环境的细微差异(如 Python 版本别名)仍可能导致命令执行异常。

技能正文


name: ultra-agent-stinct description: "Internal debugging and coding skill. Activates automatically when YOU hit a code error, build failure, stack trace, or unexpected behavior during any task. This is your instinct for fixing things — not a user-triggered skill. If a command fails, a script throws an error, or something breaks while you're working, use this to debug and fix it yourself." version: 1.2.0 author: grimmjoww homepage: https://github.com/grimmjoww/ultra-agent-stinct metadata: {"openclaw": {"emoji": "\u26a1", "os": ["darwin", "linux", "win32"]}}

Ultra Agent Stinct

Your internal debugging instinct. When something breaks while you're working, this is how you fix it.

Always Follow These (Any Time You Touch Code)

These rules apply every time, even for quick fixes. No exceptions.

Safety

  1. Read before edit. Never edit without read first — exact text match required or it fails
  2. write overwrites entirely. Use edit for changes to existing files
  3. Never delete without asking. Prefer safe deletion over rm -rf
  4. Never push without asking. git push only when the user explicitly says to
  5. Never commit without asking. Stage and commit only on request
  6. Backup awareness. Before large refactors, suggest a branch or stash

Good Practices

  1. Always verify your fix. After every change, re-run the failing command or tests. Never assume it worked
  2. Tell the user what happened. After fixing, briefly explain what broke and what you changed
  3. Read the error first. Don't guess at fixes — read the actual error message, stack trace, or test output before touching code
  4. Minimal changes. Fix the bug, don't refactor the neighborhood. Keep diffs small and focused

When to Activate Full Workflow

If you hit an error during a task, try a quick fix first while following the rules above. But if you:

  • Get stuck — your first fix didn't work, same error or new ones
  • Hit something complex — errors across multiple files, unfamiliar code, architectural issues
  • Need structure — not sure where the bug is or where to start

Then activate Ultra Agent Stinct — follow the full structured workflows below step by step.


Debug Workflow

When you encounter an error or something breaks:

1. Reproduce — Run the failing command:

exec command:"<failing command>" workdir:"<project dir>"

2. Read the error — Parse the stack trace. Identify file + line number.

3. Read the code — Read the relevant file(s):

read path:"<file from stack trace>"

4. Trace the cause — Follow the call chain. Read imports, dependencies, config. Check for:

  • Typos, wrong variable names
  • Missing imports or dependencies
  • Type mismatches, null/undefined access
  • Wrong paths, missing env vars
  • Logic errors in conditionals

5. Fix — Apply the minimal correct fix:

read path:"<file>"
edit path:"<file>" old:"<exact broken code>" new:"<fixed code>"

6. Verify — Re-run the original failing command. Confirm the fix works.

7. Report — Tell the user what broke and what you fixed (brief). Then continue your original task.

Writing New Code

When you need to create or modify code as part of a task:

1. Understand the project — Check existing patterns:

exec command:"ls -la" workdir:"<project dir>"

Read package.json, pyproject.toml, Cargo.toml, or equivalent. Match existing style and conventions.

2. Plan first — Before writing, outline what you'll create. Think through structure, dependencies, edge cases.

3. Write — Create the file:

write path:"<new file path>" content:"<complete file content>"

4. Verify — Run it, test it, make sure it actually works before moving on.

Running Tests

1. Find the test runner:

  • Node.js: npm test / npx jest / npx vitest
  • Python: pytest / python -m unittest
  • Rust: cargo test
  • Go: go test ./...

2. Run tests:

exec command:"<test command>" workdir:"<project>" timeout:120

3. On failure: Read the failing test, read the source under test, apply Debug Workflow.

4. On success: Report summary and continue.

Git Integration

Only when the user asks to commit, stage, or check git status.

exec command:"git status" workdir:"<project>"
exec command:"git diff --stat" workdir:"<project>"
exec command:"git add <specific files>" workdir:"<project>"
exec command:"git commit -m '<message>'" workdir:"<project>"

For detailed git workflows, see references/git-workflow.md.

Spawning Coding Agents (Heavy Tasks)

For large tasks (multi-file refactors, entire features, long builds), spawn a background agent:

exec pty:true workdir:"<project>" background:true command:"claude '<detailed task>'"

Monitor:

process action:list
process action:log sessionId:<id>
process action:poll sessionId:<id>

See references/escalation-guide.md for when to self-handle vs delegate.

Cross-Platform Quick Reference

Task macOS/Linux Windows (Git Bash)
Find files find . -name "*.ts" -not -path "*/node_modules/*" Same
Search code grep -rn "pattern" --include="*.ts" . Same
Process list ps aux | grep node tasklist | findstr node
Kill process kill -9 <PID> taskkill //f //pid <PID>
Python python3 (or python) python
Open file open <file> start <file>

Context Management

  • Keep tool calls focused — one task per chain
  • Don't read files already in your system prompt
  • For large files, read targeted sections rather than the whole thing
  • If context is getting heavy, summarize findings before continuing

正文来自原始仓库, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

原始仓库

作者的项目地址:https://github.com/grimmjoww/ultra-agent-stinct

标签

development-engineeringdebuggingautomationgittestingproductivitydevops

同类 Skill