
Devtu Github
- 323 installs
- 1.6k repo stars
- Updated August 4, 2026
- mims-harvard/tooluniverse
devtu-github is a contribution workflow skill that opens issues, branches, commits, and pull requests following ToolUniverse conventions for developers adding or updating scientific tools.
About
devtu-github is a Git workflow skill from mims-harvard/tooluniverse for developers contributing scientific tools to the ToolUniverse repository. The skill guides opening GitHub issues, creating branches, committing tool changes, and opening pull requests that follow ToolUniverse repo conventions when adding or updating tools in the catalog. Developers reach for devtu-github when extending ToolUniverse with new scientific utilities or patching existing tool definitions and need the PR process to match project standards. The workflow spans issue creation through review-ready PRs so contributions land cleanly in the Harvard-affiliated tool registry. Use it when the task is repository contribution mechanics for ToolUniverse, not when implementing unrelated application features. Skip it for non-ToolUniverse repositories or when only local tool prototyping is needed without upstream contribution.
- Standardizes branches and commits for tool PRs
- Links issues to new or updated connectors
- Prepares review-ready diffs for maintainers
- Aligns contributions with ToolUniverse repo norms
Devtu Github by the numbers
- 323 all-time installs (skills.sh)
- +5 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #131 of 733 Git & Pull Requests skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/mims-harvard/tooluniverse --skill devtu-githubAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 323 |
|---|---|
| repo stars | ★ 1.6k |
| Last updated | August 4, 2026 |
| Repository | mims-harvard/tooluniverse ↗ |
How do you contribute tools to ToolUniverse on GitHub?
Open issues, branch, commit tool changes, and open PRs following ToolUniverse repo conventions when adding or updating scientific tools.
Who is it for?
Developers adding or updating scientific tools in mims-harvard/tooluniverse who need the correct GitHub issue, branch, commit, and PR workflow.
Skip if: Contributors working outside ToolUniverse or developers who only need local scientific tool prototypes without upstream GitHub submission.
When should I use this skill?
A developer adds or updates a ToolUniverse scientific tool and needs issues, branches, commits, and PRs following repo conventions.
What you get
A GitHub issue, feature branch, commits, and a pull request following ToolUniverse repository conventions.
Files
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:
# 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/
done2. Verify nothing unwanted is staged:
git status --shortRed flags - these should NEVER be staged:
*_SUMMARY.md,*_REPORT.md,SESSION_*.mdin roottest_*.pyin root (these are ad-hoc scripts, not real tests).envor credential filestemp_docs_and_tests/contents
Phase 2: Activate Pre-Commit Hooks
3. Ensure pre-commit is installed and active:
pre-commit installThis enables automatic checks on every git commit:
ruff check --fix- Python linting with auto-fixruff format- Code formatting- YAML/TOML validation
- Trailing whitespace removal
- End of file fixes
4. Verify hooks are active:
ls -la .git/hooks/pre-commitPhase 3: Run Tests
5. Run the full test suite locally:
python -m pytest tests/ -x --tb=short -q6. 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):
git add src/tooluniverse/specific_file.py tests/specific_test.py8. Commit (pre-commit hooks run automatically):
git commit -m "Clear, descriptive message"9. Rebase onto latest main BEFORE pushing (CRITICAL — prevents PR conflicts):
git fetch origin
git stash # stash any uncommitted work
git rebase origin/main
git stash pop # restore uncommitted workIf rebase conflicts arise, resolve them (keep our newer changes), then:
git add <conflicted-file>
git rebase --continue10. Push (force-with-lease after a rebase):
git push --force-with-lease origin <branch-name>After pushing, verify the PR is conflict-free:
gh pr view <PR-number> --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 secretstemp_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():
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:
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:
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:
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 <file> |
| Remove from tracking | git rm --cached <file> |
| 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_*.pyscripts moved totemp_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 <specific-files>instead ofgit add . - Write clean, professional commit messages
- One logical change per commit
DevTU GitHub CI & Testing Skill
You are an expert at debugging and fixing GitHub CI failures, test issues, and pre-commit hook problems in ToolUniverse development.
Mission
When the user reports GitHub CI failures, test failures, or wants to push changes to GitHub: 1. Activate pre-commit hooks if not already active 2. Run tests locally to catch issues before pushing 3. Fix test failures systematically 4. Ensure temp files are not pushed to GitHub 5. Commit and push fixes properly
Pre-Commit Hook Setup
Step 1: Check if Pre-Commit is Installed
pre-commit --versionIf not installed:
pip install pre-commitStep 2: Activate Pre-Commit Hooks
pre-commit installThis installs hooks that run automatically on git commit:
ruff check- Python lintingruff format- Code formatting- YAML/TOML validation
- Trailing whitespace removal
- End of file fixes
Step 3: Verify Installation
ls -la .git/hooks/pre-commitShould show an executable pre-commit file.
Running Tests Locally
Before Every Push
CRITICAL: Always run tests locally before pushing to avoid CI failures.
Full Test Suite (Recommended)
python -m pytest tests/ -x --tb=short -qOptions:
-x: Stop at first failure--tb=short: Short traceback format-q: Quiet mode (less verbose)
Expected time: ~6 minutes for full suite
Quick Test (Specific Files)
python -m pytest tests/test_task_manager.py -v
python -m pytest tests/test_tooluniverse_cache_integration.py -v
python -m pytest tests/unit/test_run_parameters.py -vTest a Single Failing Test
python -m pytest tests/path/to/test.py::TestClass::test_method -xvsCommon Test Failure Patterns
Pattern 1: KeyError: 'role' in Message Tests
Symptom:
KeyError: 'role'
# in code like: if msg["role"] == "tool"Root Cause: The test is calling tu.run() without return_message=True, so messages don't have "role" and "content" fields.
How tu.run() Works:
return_message=False(default): Returns raw results as listreturn_message=True: Returns formatted messages with "role" and "content"
Fix:
# WRONG:
messages = tu.run(batch_calls, use_cache=True)
if msg["role"] == "tool": # ❌ KeyError!
# CORRECT:
messages = tu.run(batch_calls, use_cache=True, return_message=True)
if msg.get("role") == "tool": # ✅ Safe accessFiles Affected Today:
tests/test_tooluniverse_cache_integration.pytests/unit/test_run_parameters.py
Pattern 2: Mock Object Not Subscriptable
Symptom:
TypeError: 'Mock' object is not subscriptable
# in code like: result["data"]["value"]Root Cause: The mock is returning a Mock object instead of actual data because: 1. Mock methods aren't configured properly 2. Missing _get_tool_instance method on mock ToolUniverse 3. Shared mock instances between tests
Fix for Mock ToolUniverse:
@pytest.fixture
def mock_tool_universe():
mock_tu = Mock()
# Create SEPARATE mock tools (avoid shared state)
mock_tool1 = Mock()
mock_tool1.run = AsyncMock(return_value={"data": {"result": "success"}})
mock_tool2 = Mock()
mock_tool2.run = AsyncMock(return_value={"data": {"result": "success"}})
# Use real dict (not mock)
mock_tu.all_tool_dict = {"TestTool": mock_tool1, "OtherTool": mock_tool2}
# Add _get_tool_instance method (TaskManager needs this!)
def get_tool_instance(tool_name, cache=True):
return mock_tu.all_tool_dict.get(tool_name)
mock_tu._get_tool_instance = get_tool_instance
return mock_tuFix for Async Tool Mocks:
# WRONG:
mock_tool.run = async_function # Direct assignment
# CORRECT:
mock_tool.run = AsyncMock(side_effect=async_function) # Proper async mockFiles Affected Today:
tests/test_task_manager.py
Pattern 3: Linting Errors (F841, E731)
Symptom:
F841 Local variable assigned but never used
E731 Do not assign a lambda expression, use a defCommon F841 Fixes:
# Unused variable
result = some_function() # ❌ F841 if not used
# Fix 1: Use underscore
_ = some_function() # ✅ Indicates intentionally unused
# Fix 2: Actually use it
result = some_function()
assert result is not None # ✅ Now it's usedCommon E731 Fixes:
# Lambda assignment
get_value = lambda x: x * 2 # ❌ E731
# Fix: Use def
def get_value(x): # ✅
return x * 2Pattern 4: Temp Files Being Pushed to GitHub
Symptom:
User: "do not push temp folder into github!"Root Cause: Files were added to git using git mv before being added to .gitignore, so they're tracked even though .gitignore lists them.
Fix:
# 1. Remove from git tracking (keeps local files)
git rm -r --cached temp_docs_and_tests/
# 2. Verify .gitignore has the entry
grep "temp_docs_and_tests" .gitignore
# Should show: temp_docs_and_tests/
# 3. Commit the removal
git commit -m "Remove temp_docs_and_tests/ from git tracking"
# 4. Push
git push origin auto
# 5. Verify (local files exist, git doesn't track)
ls temp_docs_and_tests/ | wc -l # Should show files
git ls-files temp_docs_and_tests/ | wc -l # Should show 0Prevention: Always add folders to .gitignore BEFORE creating/moving files:
echo "temp_docs_and_tests/" >> .gitignore
git add .gitignore
git commit -m "Add temp folder to gitignore"Systematic Debugging Workflow
Step 1: Activate Pre-Commit Hook
pre-commit installStep 2: Run Tests Locally
python -m pytest tests/ -x --tb=short -q 2>&1 | tail -50Look for:
FAILED tests/...- Which test failed- Error message - KeyError, TypeError, AssertionError, etc.
- Line number - Where the failure occurred
Step 3: Reproduce the Specific Failure
python -m pytest tests/path/to/test.py::TestClass::test_method -xvsStep 4: Read the Test File
# Read the failing test to understand what it's testing
cat tests/path/to/test.py | grep -A 20 "def test_method"Step 5: Apply Pattern-Based Fix
- KeyError 'role' → Add
return_message=Trueand use.get() - Mock not subscriptable → Fix mock configuration
- F841/E731 → Fix linting issues
- Temp files pushed → Remove from git tracking
Step 6: Verify Fix Locally
python -m pytest tests/path/to/test.py -xvsShould see: 1 passed
Step 7: Run Full Test Suite
python -m pytest tests/ -x --tb=short -qEnsure no regressions were introduced.
Step 8: Commit with Pre-Commit Hook
git add <fixed_files>
git commit -m "Fix test: <brief description>"The pre-commit hook will run automatically and check:
- ✅ Ruff linting
- ✅ Ruff formatting
- ✅ YAML/TOML validity
- ✅ Trailing whitespace
Step 9: Push to GitHub
git push origin autoQuick Reference Commands
Pre-Commit
pre-commit install # Activate hooks
pre-commit run --all-files # Run manually on all files
pre-commit autoupdate # Update hook versionsTesting
# All tests
pytest tests/ -x --tb=short -q
# Specific test
pytest tests/test_file.py::TestClass::test_method -xvs
# With coverage
pytest tests/ --cov=src/tooluniverse --cov-report=term-missing
# Stop after N failures
pytest tests/ --maxfail=3Git
# Check what will be committed
git status --short
# Unstage files
git restore --staged <file>
# Remove from tracking but keep local
git rm --cached <file>
# Show what changed in last commit
git show HEAD
# Amend last commit (use carefully!)
git commit --amend --no-editCommon Mistakes to Avoid
❌ Don't: Push Without Running Tests
git add .
git commit -m "Fix"
git push # ❌ Might fail CI!✅ Do: Test Before Push
python -m pytest tests/ -x --tb=short -q # Run tests first
git add <specific_files>
git commit -m "Fix test_something: add return_message=True"
git push❌ Don't: Modify Multiple Unrelated Things
# Commit mixes test fixes with new features
git commit -m "Fix tests and add new feature" # ❌ Hard to review✅ Do: Commit Fixes Separately
git add tests/test_cache.py
git commit -m "Fix test_cache: add return_message=True"
git add src/feature.py
git commit -m "Add new feature X"❌ Don't: Use git add . Blindly
git add . # ❌ Might include temp files, logs, etc.✅ Do: Add Specific Files
git add tests/test_file.py src/module.py
# Or review with: git add -pWhat to Push and What NOT to Push
✅ ALWAYS Push (Production Code)
Source Code:
src/tooluniverse/*.py- Core library codetests/*.py- Test filesexamples/*.py- Example scriptsskills/*/- Skill files (usegit add -fif in .gitignore)
Configuration:
pyproject.toml- Project configurationsetup.py- Package setup.pre-commit-config.yaml- Pre-commit configurationpytest.ini- Test configuration.gitignore- Git ignore rules
Documentation:
README.md- Main documentationdocs/**/*.rst- Sphinx documentationdocs/**/*.md- Markdown documentation (NOT temp docs!)CHANGELOG.md- Version historyLICENSE- License file
❌ NEVER Push (Temporary/Local Files)
Temp Folders:
temp_docs_and_tests/- Temporary documentation and test filestemp/,tmp/- Any temporary directories.temp/,._temp/- Hidden temp directories
Build Artifacts:
build/,dist/- Package build outputs*.egg-info/- Python package metadata__pycache__/- Python bytecode cache*.pyc,*.pyo- Compiled Python files
IDE and Editor Files:
.vscode/- VS Code settings (usually).idea/- PyCharm settings*.swp,*.swo- Vim swap files.DS_Store- macOS finder metadata
Logs and Data:
*.log- Log files*.sqlite,*.db- Database files (unless example data)cache/- Cache directories*.tmp- Temporary files
Environment Files:
.env- Environment variables (contains secrets!).env.local- Local environment configvenv/,env/- Virtual environments.python-version- Local Python version
Personal Configuration:
.claude/- Claude Code configuration*.local- Personal config files
⚠️ MAYBE Push (Check First)
Skills:
skills/devtu-*/- Development skills (check.gitignore)- If creating new devtu skill: use
git add -f skills/devtu-skillname/
Data Files:
- Small example data: ✅ Push
- Large datasets: ❌ Don't push (use Git LFS or external storage)
Configuration:
.vscode/settings.json- Only if team shares settingsMakefile- ✅ Push if used for automation
How to Check What Will Be Pushed
Before committing:
# See what files are staged
git status --short
# See detailed diff of what will be committed
git diff --cached
# Check if a file is ignored
git check-ignore -v filenameAfter committing, before pushing:
# See what commits will be pushed
git log origin/auto..HEAD
# See files changed in commits that will be pushed
git diff origin/auto..HEAD --name-statusEmergency: Accidentally Staged Wrong Files
Unstage specific file:
git restore --staged filenameUnstage all files:
git restore --staged .Undo last commit (keeps changes):
git reset --soft HEAD~1Remove file from git but keep local:
git rm --cached filenameVerifying .gitignore Works
Check if files are ignored:
# Check specific file
git check-ignore -v temp_docs_and_tests/somefile.md
# Should output the .gitignore rule that matches
# Example: .gitignore:152:temp_docs_and_tests/List all tracked files (should NOT include temp):
git ls-files | grep temp_docs_and_tests
# Should return nothing (0 lines)List all ignored files:
git status --ignoredSuccess Checklist
Before pushing to GitHub, ensure:
- [ ] Pre-commit hook is installed (
pre-commit install) - [ ] All tests pass locally (
pytest tests/ -x) - [ ] No linting errors (pre-commit runs on commit)
- [ ] Temp files are in .gitignore and not tracked
- [ ] Commit message is clear and descriptive
- [ ] Only relevant files are committed (not temp/logs)
- [ ] Changes are on the correct branch
Example Session
User: "GitHub CI is failing with test errors"
Your Response:
I'll help you fix the CI failures. Let me follow the systematic approach:
**Step 1: Activate pre-commit hooks**pre-commit install
**Step 2: Run tests locally to identify failures**python -m pytest tests/ -x --tb=short -q 2>&1 | tail -50
*[Wait for results and analyze the failure pattern]*
**Step 3: Fix the specific failure**
*[Apply pattern-based fix - e.g., add return_message=True for KeyError 'role']*
**Step 4: Verify the fix**python -m pytest tests/test_file.py -xvs
**Step 5: Run full test suite**python -m pytest tests/ -x --tb=short -q
**Step 6: Commit and push**git add tests/test_file.py git commit -m "Fix test: add return_message=True" git push origin auto
All tests should now pass in CI! ✅Files Changed Today (Real Examples)
Commit 1: fca22e2 - Fix test_task_manager.py
Issue: Mock not subscriptable Fix:
- Create separate mock tool instances
- Add
_get_tool_instancemethod - Use
AsyncMock(side_effect=...)for async tools
Commit 2: 890cb11 - Fix test_tooluniverse_cache_integration.py
Issue: KeyError: 'role' Fix:
- Add
return_message=True - Change
msg["role"]tomsg.get("role")
Commit 3: f775c6f - Fix test_run_parameters.py
Issue: KeyError: 'role' in batch test Fix:
- Add
return_message=True - Use
.get()for safe access
Commit 4: 1d9222a - Remove temp_docs_and_tests/
Issue: Temp folder being pushed to GitHub Fix:
git rm -r --cached temp_docs_and_tests/- Commit removal (keeps local files)
Memory Markers
When you see these patterns:
KeyError: 'role'→ Missingreturn_message=TrueMock object is not subscriptable→ Fix mock configurationF841orE731→ Linting errors to fix- User says "don't push temp folder" → Check
git ls-filesand remove from tracking
Always remember: 1. Pre-commit hook MUST be active 2. Test locally BEFORE pushing 3. Fix one test at a time 4. Verify full suite before pushing 5. Check that temp files aren't tracked
End of Instructions
Follow this systematic approach every time there are CI failures or test issues. The patterns are proven to work - we fixed 40 tests today using these exact techniques!
{
"name": "devtu-github",
"version": "1.0.0",
"description": "Debug and fix GitHub CI failures, test issues, and pre-commit hook problems in ToolUniverse development",
"trigger_patterns": [
"github ci fail",
"test fail",
"pre-commit",
"fix ci",
"push fail",
"linting error",
"tests not passing"
],
"author": "ToolUniverse Team",
"tags": ["development", "testing", "ci", "github", "debugging"],
"instructions_file": "instructions.md",
"examples": [
{
"user": "The GitHub CI is failing with test errors",
"assistant": "I'll help you debug and fix the CI failures. Let me start by activating pre-commit hooks and running tests locally."
},
{
"user": "I need to fix linting errors before committing",
"assistant": "I'll activate the pre-commit hooks which will automatically run linting checks on commit."
},
{
"user": "Tests are failing with KeyError in messages",
"assistant": "This is likely a return_message issue. Let me check if tu.run() calls need return_message=True parameter."
}
]
}
Related skills
FAQ
What repository does devtu-github target?
devtu-github targets the mims-harvard/tooluniverse repository, guiding issue creation, branching, commits, and pull requests when developers add or update scientific tools.
What does devtu-github produce?
devtu-github produces a GitHub issue, feature branch, convention-compliant commits, and a pull request ready for ToolUniverse maintainers to review tool additions or updates.