SuperAPI AI Directory

new-project-setup

Coding & development

View repository

Updated 10-15 22:10

About this skill

Skill: new-project-setup

WHAT

Purpose and context

  • Purpose: build llmwiki/ from scratch for a project: pull template + install skill, wiki directory skeleton, RTK (WSL), seed wiki, then onboard codebase.
  • Trigger (when to use): Project does not yet have llmwiki/. Or reset from scratch.
  • Non-goals: does not install skills itself (sync-template step 7 handles it); does not call lint separately (onboard-codebase already includes it); does not install RTK outside WSL; does not self-trigger (disable-model-invocation: true).

Mental model

check llmwiki → sync-template (template + skills) → khung thư mục wiki → RTK (chỉ WSL) → seed (project-requirements + log + index) → onboard-codebase (concepts + entities + lint) → output report.

Input and output contract

Field Required? Meaning
In project directory yes run at project root
In README.md, package.json or go.mod no source of project name + stack for seed
In reset answer when llmwiki/ already exists whether to reset or not
Out llmwiki/wiki/{concepts,entities,sources/draft}, llmwiki/{skills,raw} yes directory skeleton + index.md, log.md, raw/.gitkeep
Out llmwiki/wiki/sources/project-requirements.md yes OKF frontmatter + ## Origin
Out RTK hooked WSL only rtk init -g + hook in ~/.claude/settings.json
Out wiki onboarded + draft output report yes concepts/entities generated by onboard-codebase

Rules and capabilities

  • RULE-01 (MUST): Skill install: sync-template step 7 handles it — do not duplicate
  • RULE-02 (MUST): onboard-codebase includes lint — do not call lint again
  • RULE-03 (MUST): RTK guard uname -r | grep -qi microsoft mandatory before curl
  • Capabilities: write project filesystem; network (pull template, download RTK); modify global agent config (~/.claude/settings.json) only via rtk init -g; call sub-skills sync-template and onboard-codebase.

Failure boundaries

  • llmwiki/ already exists → clarify: ask user whether to reset; if not, stop.
  • Not WSL → RTK step skipped (not an error).
  • RTK hook not found in settings.json → partial, print "MANUAL: add rtk hook to settings.json".
  • sync-template or onboard-codebase errors → failed at that step, notify user.

HOW

Main workflow

Step Type Inputs Action Outputs/exit Failure/next
W01 deterministic project root CHECK llmwiki exists exists or missing exists → B01
W02 effect network INVOKE sync-template: pull template + install skills commands + skills installed error → failed
W03 effect — Init wiki folder structure folder skeleton —
W04 effect OS RTK token proxy (WSL only) — B02 RTK hooked not WSL → skip; missing hook → MANUAL
W05 judgment README/package.json/go.mod Seed wiki: project-requirements, log, index seed pages —
W06 effect codebase INVOKE onboard-codebase concepts + entities + lint error → failed
W07 effect result Output Report draft draft + index + log —

Step details (source of truth for W01–W07):

1. CHECK llmwiki exists:

test -d llmwiki && echo exists || echo missing

exists → ask user whether to reset. Reset = delete concepts/ + entities/, KEEP log.md + sources/.

2. Pull template + install skills:

# INVOKE: sync-template
# sync-template tự pull từ rheinmir/setup@orca và install skills vào:
#   .claude/commands/           → Claude Code
#   ~/.agents/skills/*/SKILL.md → OpenCode / Antigravity

3. Init wiki folder structure:

mkdir -p llmwiki/wiki/{concepts,entities,sources/draft} llmwiki/{skills,raw}
touch llmwiki/wiki/index.md llmwiki/wiki/log.md llmwiki/raw/.gitkeep

4. RTK token proxy (WSL only):

# Guard — chỉ chạy trong WSL:
uname -r | grep -qi microsoft || { echo "RTK install: WSL only — skip"; exit 0; }

# CHECK đã cài chưa:
rtk --version 2>/dev/null || {
  curl -fsSL https://github.com/rtk-ai/rtk/releases/latest/download/rtk-x86_64-unknown-linux-musl.tar.gz \
    | tar xz -C /usr/local/bin
}

# Init global config + patch ~/.claude/settings.json:
rtk init -g

# Verify hook:
grep -q "rtk hook claude" ~/.claude/settings.json && echo "RTK hooked" || echo "MANUAL: add rtk hook to settings.json"

5. Seed wiki:

# Đọc README.md, package.json hoặc go.mod → project name + stack
  • Create llmwiki/wiki/sources/project-requirements.md — frontmatter + ## Origin
  • OKF v0.1 (R9): frontmatter is a YAML block --- with type non-empty — copy _template.md, don't use **Type:** bold (old format).
  • Append llmwiki/wiki/log.md: ## YYYY-MM-DD — init — <project-name>
  • Create llmwiki/wiki/index.md — header + empty table

6. INVOKE: onboard-codebase → populate concepts/ + entities/ + lint.

Branches

ID Kind Guard Behavior Skip / failure Rejoin
B01 conditional_required W01 returns exists ask user to reset; reset = delete concepts/ + entities/, KEEP log.md + sources/ user doesn't reset → stop W02
B02 conditional_required kernel contains "microsoft" (WSL) install RTK if not present, rtk init -g, verify hook not WSL → skip step 4 W05

Validation and stopping

Check with command: test -d llmwiki returns exists; on WSL grep settings.json for "RTK hooked"; project-requirements.md has frontmatter type (R9) + ## Origin. Lint runs inside onboard-codebase, don't rerun. Stop after output report.

Examples

  • Positive: new Go repo doesn't have llmwiki/ on macOS → W01 missing → sync-template → mkdir khung → RTK step prints "RTK install: WSL only — skip" → seed from go.mod → onboard-codebase → draft DDMMYY-init-<project>.md.
  • Boundary/failure: rerun on a project that already has llmwiki/ → W01 exists → ask to reset; user agrees → delete only concepts/ + entities/, log.md and sources/ remain intact.

Delivery — Output Report

After all main skill tasks complete, write a propose draft to the wiki.

Steps

1. Build the filename:

  • Format: DDMMYY-<ten>.md
  • DDMMYY = today (e.g., 020626 for 2 June 2026)
  • <ten> = 2–4 kebab-case words summarising what was done (e.g., landing-page-coteccons, brand-kit-fintech, ingest-auth-spec)

2. Write llmwiki/wiki/sources/draft/DDMMYY-<ten>.md:

---
type: draft
title: "DDMMYY-<ten>"
status: proposed
tags: [<skill-name>, output-report]
timestamp: YYYY-MM-DD
---

# DDMMYY-<ten>
**Type:** draft
**Status:** proposed
**Tags:** <skill-name>, output-report
**Proposed:** YYYY-MM-DD

## What
<One sentence — what this skill invocation produced or decided>

## Output
<Key artefacts, files created/modified, or decisions made>

## Files
| File | Action |
|------|--------|
| `path/to/file` | created / modified |

## Notes
- Invoked via: `/<skill-name>` skill

## Origin
- **Draft:** `wiki/sources/draft/DDMMYY-<ten>.md`
- **Commit:** _(filled by verify-before-commit)_
- **Date promoted:** _(filled by verify-before-commit)_

3. Update wiki index & log:

  • llmwiki/wiki/index.md — append one row: | [DDMMYY-<ten>](sources/draft/DDMMYY-<ten>.md) | draft | YYYY-MM-DD |
  • llmwiki/wiki/log.md — append: ## YYYY-MM-DD — <skill-name> — <ten>

Skip only when the skill produces zero artefacts and zero decisions (e.g., a pure display mode like /caveman-stats).