skills/release-code/SKILL.md
Prepare research code repositories for public release. Use for open-source cleanup, README/LICENSE/CITATION, GitHub releases, tags, and reproducibility packages.
npx skillsauth add a-green-hand-jack/ml-research-skills release-codeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Prepare a research code repository for public release: audit for security issues, generate missing assets (README, citation, license), tag the version, and create a GitHub release.
Release uses project toolchain gates as evidence, not as decoration. Prefer non-mutating checks first. Run mutating format/fix commands only when requested or required by project policy, then review the diff.
<installed-skill-dir>/
├── SKILL.md
├── checklist.md # Detailed item-by-item checklist reference
└── templates/
├── README_ml_paper.md # README template for ML paper repos
└── CITATION.cff # Citation file template
Ask the user in a single message:
v1.0.0 (default: v1.0.0 for first release)Run the following checks (read output silently, report summary to user):
# Check for common secret patterns
git -C "$(git rev-parse --show-toplevel)" log --all --oneline | head -5
grep -rI --include="*.py" --include="*.yaml" --include="*.json" --include="*.env" \
-E "(password|secret|api_key|token|credential|private_key)\s*=\s*['\"][^'\"]{6}" \
"$(git rev-parse --show-toplevel)" 2>/dev/null | head -20
# Prefer dedicated scanners when available
command -v gitleaks >/dev/null && gitleaks dir --no-banner --redact "$(git rev-parse --show-toplevel)"
command -v detect-secrets >/dev/null && detect-secrets scan "$(git rev-parse --show-toplevel)"
# Find large files that shouldn't be in the repo
find "$(git rev-parse --show-toplevel)" -type f -size +50M \
! -path "*/.git/*" ! -path "*/outputs/*" ! -path "*/wandb/*" 2>/dev/null
# Check for files that should not be public
find "$(git rev-parse --show-toplevel)" -type f \( \
-name ".env" -o -name "*.pem" -o -name "*.key" -o \
-name "secrets.yaml" -o -name "credentials.json" \
\) ! -path "*/.git/*" 2>/dev/null
ROOT="$(git rev-parse --show-toplevel)"
for f in README.md LICENSE CITATION.cff .gitignore requirements.txt pyproject.toml setup.py; do
[ -f "$ROOT/$f" ] && echo "EXISTS: $f" || echo "MISSING: $f"
done
git -C "$(git rev-parse --show-toplevel)" status --short
git -C "$(git rev-parse --show-toplevel)" log --oneline -5
Run available non-mutating gates and report skipped tools explicitly:
ROOT="$(git rev-parse --show-toplevel)"
command -v pre-commit >/dev/null && pre-commit run --all-files || true
command -v shellcheck >/dev/null && find "$ROOT" -name "*.sh" -not -path "*/.git/*" -print0 | xargs -0 shellcheck || true
command -v shfmt >/dev/null && shfmt -d "$ROOT" || true
command -v actionlint >/dev/null && actionlint "$ROOT/.github/workflows"/*.yml "$ROOT/.github/workflows"/*.yaml 2>/dev/null || true
command -v nbstripout >/dev/null && find "$ROOT" -name "*.ipynb" -not -path "*/.git/*" -print0 | xargs -0 nbstripout --dry-run || true
command -v lychee >/dev/null && lychee --no-progress "$ROOT/README.md" "$ROOT/docs/**/*.md" || true
command -v taplo >/dev/null && find "$ROOT" -name "*.toml" -not -path "*/.git/*" -print0 | xargs -0 taplo fmt --check || true
command -v yamllint >/dev/null && yamllint "$ROOT" || true
Treat failed required gates as release blockers. Treat missing optional tools as skipped unless the project policy requires them.
Report audit findings to the user as a checklist:
Ask the user to fix any blockers before continuing.
Based on the 2d audit, generate any missing files. Ask the user's preference before overwriting existing files.
If missing, generate the appropriate license file:
MIT License
Copyright (c) {YEAR} {AUTHORS}
[standard MIT text]
Write to {PROJECT_ROOT}/LICENSE.
Read the template from <installed-skill-dir>/templates/CITATION.cff.
Fill in placeholders:
| Placeholder | Value |
|---|---|
| {TITLE} | paper title |
| {AUTHORS_LIST} | authors as YAML list (see template format) |
| {YEAR} | publication year |
| {VENUE} | conference/journal name |
| {ARXIV_ID} | arXiv ID (if available) |
| {GITHUB_REPO} | github.com/username/repo |
| {DATE_RELEASED} | today's date (YYYY-MM-DD) |
Write to {PROJECT_ROOT}/CITATION.cff.
If README is missing or skeletal (< 50 lines):
Read the template from <installed-skill-dir>/templates/README_ml_paper.md.
Fill in all placeholders. Leave [TODO: ...] markers where the user must provide content (e.g., exact performance numbers, dataset download links).
Do NOT overwrite a substantial existing README — instead, identify what sections are missing and offer to append them.
If missing, generate a Python/ML .gitignore:
# Python
__pycache__/
*.py[cod]
*.egg-info/
.eggs/
dist/
build/
.venv/
venv/
# ML outputs (keep jobs/ but ignore outputs/)
outputs/
wandb/
*.ckpt
*.pt
*.pth
*.pkl
runs/
lightning_logs/
# Data (large files)
data/
datasets/
# Secrets
.env
*.pem
*.key
secrets.yaml
credentials.json
# IDE
.vscode/settings.json
.idea/
*.DS_Store
Read <installed-skill-dir>/checklist.md for the full item list.
Present the user with a condensed checklist grouped by category. For each item, report status (✅ done / ⚠️ needs attention / ❌ missing):
📁 Repository hygiene
✅ .gitignore covers outputs/, wandb/, *.ckpt
⚠️ outputs/ directory exists — confirm not committed
📄 Documentation
✅ README.md present (142 lines)
❌ No CITATION.cff — will generate
⚠️ README missing "Pre-trained Models" section
🔐 Security
✅ No secrets detected
✅ No large files in git history
🧰 Toolchain gates
✅ pre-commit / ruff / pytest release gates passed
⚠️ lychee skipped — not installed
❌ gitleaks found possible secret in config.yaml
📦 Reproducibility
✅ requirements.txt / pyproject.toml present
⚠️ No environment.yml for conda users
⚠️ No Dockerfile
⚖️ Legal
✅ LICENSE (MIT) present
Ask: "Are you ready to proceed with tagging and publishing, or do you want to fix any of the above first?"
Once the user confirms:
ROOT="$(git rev-parse --show-toplevel)"
# Stage only new/modified tracked files (not untracked outputs)
git -C "$ROOT" add LICENSE CITATION.cff README.md .gitignore 2>/dev/null || true
git -C "$ROOT" diff --staged --stat
Ask the user to confirm the staged changes, then commit:
git -C "$ROOT" commit -m "chore: prepare code for public release ({VERSION})"
Create annotated tag:
git -C "$ROOT" tag -a "{VERSION}" -m "$(cat <<'EOF'
Release {VERSION} — {PAPER_TITLE}
Published at {VENUE}
Paper: {PAPER_URL}
Includes: {WHAT_INCLUDED}
EOF
)"
Ask: "Push commit and tag to origin?"
CURRENT_BRANCH="$(git -C "$ROOT" branch --show-current)"
git -C "$ROOT" push origin "$CURRENT_BRANCH"
git -C "$ROOT" push origin "{VERSION}"
If the user requested a GitHub release:
Check if gh is available:
gh --version 2>/dev/null && echo "gh available" || echo "gh not found"
If available, draft the release notes and create the release:
gh release create "{VERSION}" \
--title "{PAPER_TITLE} ({VERSION})" \
--notes "$(cat <<'EOF'
## {PAPER_TITLE}
**{VENUE}** | [Paper]({PAPER_URL}) | [Project Page]({PROJECT_PAGE_URL})
### What's included
{INCLUDED_ITEMS}
### Installation
\`\`\`bash
pip install -r requirements.txt
\`\`\`
### Citation
\`\`\`bibtex
{BIBTEX}
\`\`\`
EOF
)"
If gh is not available, print the release notes as text for the user to paste into GitHub.
Print a final summary:
✅ Release {VERSION} complete!
Files generated/updated:
• LICENSE
• CITATION.cff
• README.md
• .gitignore
Git:
• Commit: {COMMIT_HASH}
• Tag: {VERSION} → pushed to origin
GitHub:
• Release: https://github.com/{REPO}/releases/tag/{VERSION}
Recommended next steps:
□ Upload pre-trained weights to HuggingFace Hub / project page
□ Add repo link to the paper's arXiv abstract page
□ Tweet / post about the release
□ Email the mailing list / post to r/MachineLearning
□ Add a "Code" badge to the paper PDF (camera-ready only)
When the user says this is for an anonymous conference submission:
ROOT="$(git rev-parse --show-toplevel)"
PROJ=$(basename "$ROOT")
git -C "$ROOT" archive --format=zip HEAD -o "/tmp/${PROJ}-anonymous.zip"
echo "Anonymous zip: /tmp/${PROJ}-anonymous.zip"
When the user wants to push weights to HuggingFace:
# Requires: pip install huggingface_hub
python -c "
from huggingface_hub import HfApi
api = HfApi()
api.upload_folder(
folder_path='checkpoints/',
repo_id='username/model-name',
repo_type='model',
)
"
[](https://github.com/username/repo)
[](https://arxiv.org/abs/2401.00000)
[](LICENSE)
After release, submit to paperswithcode.com to link the repository to the paper automatically.
testing
Bootstrap project-local ml-research-skills. Use from global installs when creating a new ML research project, enabling this collection in an existing ML research repo, or deciding whether to install the full bundle locally. Route to project-init for new projects; do not handle paper or experiment work directly.
development
Route project operations tasks — git, memory, bootstrap, remote, workspace, code review, timeline, ops — to the correct skill. Use when the task involves commits, pushes, worktrees, project memory, enabling project-local skills, SSH/server coordination, sidecar runners, or audits. Do not solve the ops task directly.
testing
Route ML/AI paper writing tasks to the correct skill — contract planning, prose drafting, section writing, consistency editing, review simulation, rebuttal, submission, or citation work. Use when the task involves writing, revising, reviewing, or submitting a paper instead of guessing between paper-writing-assistant, paper-writing-contract-planner, paper-reviewer-simulator, auto-paper-improvement-loop, or citation skills. Do not draft prose directly.
data-ai
Project-local router for ML research skill selection. Use inside an initialized ML research project, or while maintaining this skill repo, when the user describes an ML research/paper/experiment/discovery/ops/release workflow and may not know the skill; route to a domain router or high-signal leaf. Do not use for generic non-ML projects.