← ClaudeAtlas

init-templatelisted

Initialise a freshly-cloned forrt-replication-template repository — derive the repo name and org from the git remote, prompt the user for author identity and paper details, substitute all {{...}} placeholder tokens, and commit the result. Run this once on first clone. After successful run, this skill removes itself.
ScienceLiveHub/forrt-replication-template · ★ 0 · Data & Documents · score 72
Install: claude install-skill ScienceLiveHub/forrt-replication-template
# /init-template You're invoked the first time a user opens Claude in a repository that was created from `forrt-replication-template`. Your job is to convert the placeholder tokens (`{{REPO_NAME}}`, `{{AUTHOR_NAME}}`, etc.) into real values, then commit the change. ## Step 1 — Detect Verify this is a freshly-instantiated template: ```bash grep -rln '{{[A-Z_]\+}}' . \ --include='*.md' --include='*.yml' --include='*.yaml' \ --include='*.json' --include='*.cff' --include='*.toml' \ --include='Dockerfile' --include='LICENSE' \ 2>/dev/null | grep -v '^./.claude/' | head ``` If no tokens are found, tell the user the repo is already initialised and exit. ## Step 2 — Derive what you can without asking Run: ```bash git remote get-url origin 2>/dev/null ``` If the result is a GitHub URL like `https://github.com/<org>/<name>.git` or `git@github.com:<org>/<name>.git`, parse `<org>` → `{{REPO_ORG}}` and `<name>` → `{{REPO_NAME}}`. Also derive: - `{{YEAR}}` → current year (use `date +%Y`). - `{{RELEASE_DATE}}` → today (use `date +%Y-%m-%d`). If `git remote` is missing, ask the user for the GitHub org/name they intend to use. ## Step 3 — Ask the user for the rest Ask for the following (one prompt; offer them as a structured list): | Token | What to ask | |---|---| | `{{AUTHOR_NAME}}` | Full name as you'd like it to appear in citations | | `{{AUTHOR_GIVEN}}` | Given name(s) — e.g. "Anne" | | `{{AUTHOR_FAMILY}}` | Family name — e.g. "Fouilloux" | | `{{AUTHOR_EMAIL}}` |