跳到主内容
智客 ZICQ

技能库 智客分类:Agent 工作流 devtu-github

Devtu Github

TolleUniverse的 GitHub 工作流程 - 通过移动临时文件,激活承诺前钩,运行测试,并清理已上演的文件来安全地推动代码. 在向 GitHub 推进时使用, 修复 CI 失败, 或者在犯罪前清理 .

360 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

TolleUniverse 的 GitHub 工作流程 - 通过移动临时文件、激活预先承诺的钩子、运行测试和清理已处理的文件,安全地推动代码

何时用

推进到 GitHub , 修复 CI 失败, 或在犯罪前清理

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:DevTU GitHub Workflow、Instructions、Phase 1: Pre-Push Cleanup、Move session markdown files to temp_docs_and_tests/、Move root-level test scripts to temp_docs_and_tests/、Phase 2: Activate Pre-Commit Hooks。 其中含规范建议的小节:分步指令。

文件分析

文件分析:这是一份仅含 SKILL.md 的指令型技能,代理激活后整份正文进入上下文。

官方 description(原文)

GitHub workflow for ToolUniverse - push code safely by moving temp files, activating pre-commit hooks, running tests, and cleaning staged files. Use when pushing to GitHub, fixing CI failures, or cleaning up before commits.

DevTU GitHub WorkflowInstructionsPhase 1: Pre-Push CleanupMove session markdown files to temp_docs_and_tests/Move root-level test scripts to temp_docs_and_tests/Phase 2: Activate Pre-Commit HooksPhase 3: Run TestsPhase 4: Commit and PushMust show: "mergeable":"MERGEABLE"Files That Must NEVER Be PushedTemp Session Documents (Root-Level .md)Root-Level Test Scripts

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
devtu-github
description
GitHub workflow for ToolUniverse - push code safely by moving temp files, activating pre-commit hooks, running tests, and cleaning staged files. Use when pushing to GitHub, fixing CI failures, or cleaning up before commits.
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「devtu-github」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-d433fe1c5a468dba-%E5%BE%B7%E5%A4%AB%E5%9B%BE%C2%B7%E5%90%89%E8%8B%8F%E5%B8%83.html
请存为 .cursor/skills/devtu-github/SKILL.md 或 .claude/skills/devtu-github/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/mims-harvard/tooluniverse' --list

npx skills add 'https://github.com/mims-harvard/tooluniverse' --skill 'devtu-github'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: devtu-github description: GitHub workflow for ToolUniverse - push code safely by moving temp files, activating pre-commit hooks, running tests, and cleaning staged files. Use when pushing to GitHub, fixing CI failures, or cleaning up before commits. --- # DevTU GitHub Workflow Safely push ToolUniverse code to GitHub by enforcing pre-push cleanup, pre-commit hooks, and test validation. ## Instructions When the user wants to push code, fix CI, or prepare a commit, follow this workflow: ### Phase 1: Pre-Push Cleanup 1. **Move temp files out of root** - session docs and ad-hoc test scripts must NOT be pushed: ```bash # Move session markdown files to temp_docs_and_tests/ for f in $(ls *.md 2>/dev/null | grep -v README.md | grep -v CHANGELOG.md | grep -v LICENSE.md); do mv "$f" temp_docs_and_tests/ done # Move root-level test scripts to temp_docs_and_tests/ for f in $(ls test_*.py 2>/dev/null); do mv "$f" temp_docs_and_tests/ done ``` 2. **Verify nothing unwanted is staged**: ```bash git status --short ``` **Red flags** - these should NEVER be staged: - `*_SUMMARY.md`, `*_REPORT.md`, `SESSION_*.md` in root - `test_*.py` in root (these are ad-hoc scripts, not real tests) - `.env` or credential files - `temp_docs_and_tests/` contents ### Phase 2: Activate Pre-Commit Hooks 3. **Ensure pre-commit is installed and active**: ```bash pre-commit install ``` This enables automatic checks on every `git commit`: - `ruff check --fix` - Python linting with auto-fix - `ruff format` - Code formatting - YAML/TOML validation - Trailing whitespace removal - End of file fixes 4. **Verify hooks are active**: ```bash ls -la .git/hooks/pre-commit ``` ### Phase 3: Run Tests 5. **Run the full test suite locally**: ```bash python -m pytest tests/ -x --tb=short -q ``` 6. **If tests fail**, diagnose using the error patterns below and fix before proceeding. ### Phase 4: Commit and Push 7. **Stage only specific files** (never use `git add .` or `git add -A`): ```bash git add src/tooluniverse/specific_file.py tests/specific_test.py ``` 8. **Commit** (pre-commit hooks run automatically): ```bash git commit -m "Clear, descriptive message" ``` 9. **Rebase onto latest main BEFORE pushing** (CRITICAL — prevents PR conflicts): ```bash git fetch origin git stash # stash any uncommitted work git rebase origin/main git stash pop # restore uncommitted work ``` If rebase conflicts arise, resolve them (keep our newer changes), then: ```bash git add git rebase --continue ``` 10. **Push** (force-with-lease after a rebase): ```bash git push --force-with-lease origin ``` After pushing, verify the PR is conflict-free: ```bash gh pr view --json mergeable,mergeStateStatus # Must show: "mergeable":"MERGEABLE" ``` ## Files That Must NEVER Be Pushed ### Temp Session Documents (Root-Level .md) These are session notes created during development. Move to `temp_docs_and_tests/` before committing: | Pattern | Example | |---------|---------| | `*_SUMMARY.md` | `API_DISCOVERY_SESSION_SUMMARY.md` | | `*_REPORT.md` | `SKILL_TESTING_REPORT.md`, `TOOLUNIVERSE_BUG_REPORT.md` | | `SESSION_*.md` | `SESSION_2026_02_13.md` | | `IMPLEMENTATION_*.md` | `IMPLEMENTATION_COMPLETE.md` | | `BUG_ANALYSIS_*.md` | `BUG_ANALYSIS_DETAILED.md` | | `FIX_*.md` | `FIX_SUMMARY.md`, `CORRECT_FIX.md` | | `AGENT_*.md` | `AGENT_DESIGN_UPDATES.md` | **Exception**: `README.md`, `CHANGELOG.md`, `LICENSE.md` are real docs and MUST stay. ### Root-Level Test Scripts Ad-hoc test scripts like `test_*.py` in root are NOT part of the test suite (`tests/` directory is). Move them to `temp_docs_and_tests/`: | File | Purpose | |------|---------| | `test_clear_tools.py` | One-off tool cleanup test | | `test_finemapping_tools.py` | Ad-hoc tool validation | | `test_metabolomics_tools.py` | Ad-hoc tool validation | | `test_original_bug.py` | Bug reproduction | | `test_pathway_tools.py` | Ad-hoc tool validation | | `test_protein_interaction_skill.py` | Skill test | | `test_reload_fix.py` | Bug reproduction | | `test_round10_tools.py` | Ad-hoc tool validation | ### Other Excluded Files - `.env` - Environment variables with secrets - `temp_docs_and_tests/` - Already in .gitignore - `.claude/` - Claude Code configuration - `__pycache__/`, `*.pyc` - Python bytecode - `.DS_Store` - macOS metadata ## Common Test Failure Patterns ### Pattern 1: KeyError: 'role' **Symptom**: `KeyError: 'role'` when accessing message dicts **Fix**: Add `return_message=True` to `tu.run()` and use `.get()`: ```python messages = tu.run(calls, use_cache=True, return_message=True) if msg.get("role") == "tool": ``` ### Pattern 2: Mock Not Subscriptable **Symptom**: `TypeError: 'Mock' object is not subscriptable` **Fix**: Use real dicts for `all_tool_dict` and add `_get_tool_instance`: ```python mock_tu.all_tool_dict = {"Tool": mock_tool} mock_tu._get_tool_instance = lambda name, cache=True: mock_tu.all_tool_dict.get(name) ``` ### Pattern 3: Linting Errors (F841, E731) **Fix F841** (unused variable): Use `_` prefix or `_ = func()` **Fix E731** (lambda assignment): Replace with `def` ### Pattern 4: Temp Files Tracked by Git **Symptom**: `git status` shows temp files as modified/staged **Fix**: ```bash git rm -r --cached temp_docs_and_tests/ git rm --cached API_DISCOVERY_SESSION_SUMMARY.md git commit -m "Remove temp files from tracking" ``` ## Pre-Commit Hook Configuration The project uses `.pre-commit-config.yaml`: ```yaml repos: - repo: https://github.com/pre-commit/pre-commit-hooks hooks: [end-of-file-fixer, trailing-whitespace, check-yaml, check-toml] - repo: https://github.com/astral-sh/ruff-pre-commit hooks: [ruff-check --fix, ruff-format] ``` Scope: Only files matching `^(ToolUniverse/)?src/tooluniverse/` ## Quick Reference | Task | Command | |------|---------| | Activate hooks | `pre-commit install` | | Run all tests | `pytest tests/ -x --tb=short -q` | | Run specific test | `pytest tests/path/test.py::Class::method -xvs` | | Check staged files | `git status --short` | | Unstage a file | `git restore --staged ` | | Remove from tracking | `git rm --cached ` | | Move temp files | See Phase 1 commands | | Run hooks manually | `pre-commit run --all-files` | ## Pre-Push Checklist Before every push, verify: - [ ] Temp markdown files moved from root to `temp_docs_and_tests/` - [ ] Root-level `test_*.py` scripts moved to `temp_docs_and_tests/` - [ ] Pre-commit hooks installed (`pre-commit install`) - [ ] All tests pass locally (`pytest tests/ -x`) - [ ] No linting errors - [ ] Only relevant files staged (no `.env`, no temp files) - [ ] Commit message is clear and descriptive - [ ] Correct branch selected ## Git Commit Guidelines - Never include AI attribution in commits - Never commit session documentation markdown files - Use `git add ` instead of `git add .` - Write clean, professional commit messages - One logical change per commit

相关技能

Agent 工作流

Skill Creator

创造有效技能指南。 当用户想创造出新的技能(或更新现有的技能),以专业知识,工作流程,或工具集成来扩展克洛德的能力时,应该使用这种技能.

Agent 工作流

Clawdhub

使用ClawdHub CLI搜索,安装,更新并发布从taladhub.com的代理技能. 需要获取苍蝇上的新技能时使用,将安装的技能同步到最新版本或特定版本,或者发布 npm-instainddhub CLI 的新/更新的技能文件夹.

Agent 工作流

Agent Team Orchestration

管弦乐团多代理团队,任务设定周期,交接协议,审查工作流程. 使用时间: (1)建立2+特派员队伍,具有不同专业,(2)确定任务路线和生命周期(收录框_ spec_建设_审查_完成),(3)在特派员之间制定交接协议,(4)建立审查和质量关口,(5)管理特派员之间的交流和文物共享.

Agent 工作流

Superpowers

Spec-first,TDD,子代理驱动的软件开发工作流程. 当:(1)构建任何新功能或应用——触发脑暴_计划_子代理执行回路,(2)调试出一个bug或测试失败——触发系统性的根起过程,(3)用户说"让我们构建","帮助我计划","我想添加X",或"这个被打破",(4)完成一个功…