Agent skill

New Feature Setup

by trycompai in trycompai/comp

A skill your agent uses when starting a new feature, Linear ticket, or bugfix in this repo — establishes the branch + worktree + env + DB + dev-server conventions so the work is immediately ready to…

AGPL-3.0Auto-check: notesDevelopment

Install New Feature Setup

skills CLI
$ npx skills add trycompai/comp --skill new-feature-setup -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install trycompai/comp new-feature-setup --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/trycompai/comp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/new-feature-setup .claude/skills/new-feature-setup && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
new-feature-setup
GitHub stars
2k
Token cost
~1.4k tokens
SKILL.md length
610 words
Files
1
Skills in repo
31
Repo updated
First seen
Licence
AGPL-3.0

At a glance

A skill your agent uses when starting a new feature, Linear ticket, or bugfix in this repo — establishes the branch + worktree + env + DB + dev-server conventions so the work is immediately ready to…

  • Works in 5 steps: Create the worktree from origin/main → Let the hook do everything else → Start the dev server — coordinate with… → …
  • Starting a new feature
  • SKILL.md covers Overview, When to Use, When NOT to Use and Workflow, plus 3 more sections
  • Calls bun, git and bunx

What it does

New Feature Setup is an agent skill from trycompai/comp. Use when starting a new feature, Linear ticket, or bugfix in this repo — establishes the branch + worktree + env + DB + dev-server conventions so the work is immediately ready to code without fighting infra. Triggers on "start a new feature", "spin up a worktree", "begin ticket", "new branch".

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git worktrees. The repository describes itself as: AI Native platform to get companies compliant - Vanta & Drata Alternative. The licence is AGPL-3.0.

When your agent uses it

  • Starting a new feature
  • Start a new feature
  • Spin up a worktree

Example prompts

  • “start a new feature”
  • “spin up a worktree”
  • “begin ticket”
  • “/new-feature-setup”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Create the worktree from origin/main
  2. Let the hook do everything else
  3. Start the dev server — coordinate with the "active worktree" rule
  4. Code the feature
  5. When done, clean up

What it can do on your machine

Read from SKILL.md and the folder at commit 1bf4d52. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • bun
    • git
    • bunx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and bunx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

New Feature Setup loads about 1.4k tokens when it runs. Until then it costs about 78 tokens; SKILL.md has 610 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~78
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:16
    - Before copying `.env` files around by hand
  • NoteMentions a .env fileSKILL.md:42
    2. Links `.env*` files from the main clone (copies the ones with `DATABASE_URL`, rewriting it to the isolated URL; symli
  • NoteMentions a .env fileSKILL.md:62
    01` (or `3334`, etc.) to the worktree's `.env.local`. `.env.local` is not symlinked and stays per-worktree.
  • NoteMentions a .env fileSKILL.md:88
    orktree (no trigger dev, custom port via .env.local)
  • NoteMentions a .env fileSKILL.md:89
    echo "PORT=3001" >> apps/app/.env.local
  • NoteMentions a .env fileSKILL.md:101
    - `cp` or `ln -s` to copy `.env` files into a worktree
  • NoteMentions a .env fileSKILL.md:111
    | Editing `.env` in a worktree and expecting it to propagate | If it's a symlink, yes; if it's a real copy (has `DATABAS
  • NoteMentions a .env fileSKILL.md:112
    ut `PORT=<free-port>` in the worktree's `.env.local` |

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from trycompai/comp at commit 1bf4d52, republished under its AGPL-3.0 licence (© trycompai). 610 words, ~1,385 tokens.

Download SKILL.mdSave it as .claude/skills/new-feature-setup/SKILL.md (or your agent's skills folder).
name
new-feature-setup
description
Use when starting a new feature, Linear ticket, or bugfix in this repo — establishes the branch + worktree + env + DB + dev-server conventions so the work is immediately ready to code without fighting infra. Triggers on "start a new feature", "spin up a worktree", "begin ticket", "new branch".

New Feature Setup (comp monorepo)

Overview

This repo has a lot of infrastructure pre-wired into git worktree add. Use it. Don't reinvent env copying, database setup, or dependency install flows in every new session.

When to Use

  • User says "start a new feature", "spin up a worktree for X", "begin this Linear ticket", "new branch for …"
  • Before running bun install / bun run db:generate manually in a new directory
  • Before copying .env files around by hand

When NOT to Use

  • User is editing an existing worktree (already set up)
  • Infra repair / debugging of the hook itself (read .githooks/README.md instead)

Workflow

1. Create the worktree from origin/main
sh
cd /Users/mariano/code/comp   # must be the MAIN clone, not another worktree
git fetch origin main
git worktree add .worktrees/<short-slug> -b <branch-name> origin/main
  • For Linear tickets, use Linear's suggested branch name (mariano/<ticket-slug>).
  • For infra / chore work, use mariano/<short-descriptive-name> or chore/<topic>.
  • The <short-slug> on the worktree path should match the branch's suffix (it becomes the Postgres DB slug after tr '-' '_').
2. Let the hook do everything else

git worktree add fires the post-checkout hook at .githooks/post-checkout, which runs synchronously:

  1. Creates compdev_<slug> Postgres database (isolated per worktree)
  2. Links .env* files from the main clone (copies the ones with DATABASE_URL, rewriting it to the isolated URL; symlinks the rest so API keys auto-propagate)
  3. Runs bun install, applies Prisma migrations, regenerates clients

Do not run any of these by hand. If the hook logs a failure, diagnose and fix at the source — don't paper over with a manual install.

Skip toggles (rare):

  • SKIP_WORKTREE_DB=1 — share the main comp DB (drift risk; only for read-only worktrees)
  • SKIP_WORKTREE_SETUP=1 — skip install + migrate + generate (for a "just files" worktree)
  • SETUP_WORKTREE_WITH_BUILD=1 — also run bun run build (adds minutes; only when you need the built artifacts)
3. Start the dev server — coordinate with the "active worktree" rule

Trigger.dev's trigger dev CLI cannot be isolated per worktree. Running bun run dev in multiple worktrees stomps on task registration.

  • One active worktree runs bun run dev (full stack with trigger dev).
  • All other worktrees run:
    sh
    bun run --filter '@trycompai/app' dev:no-trigger    # Next.js only
    bun run --filter '@trycompai/api' dev:no-trigger    # NestJS only
  • Non-active worktrees need a different PORT to avoid collision — add PORT=3001 (or 3334, etc.) to the worktree's .env.local. .env.local is not symlinked and stays per-worktree.
  • When swapping which worktree is active, kill the old full bun run dev first so task registration is clean.
Show full SKILL.md (249 more words)Show less
4. Code the feature

Standard repo conventions apply (see AGENTS.md). Highlights:

  • TDD for any non-trivial change (superpowers:test-driven-development)
  • Brainstorm before building new UX (superpowers:brainstorming)
  • Plans + subagent-driven execution for multi-step work
  • Run audit-design-system after any frontend component edit
  • Always run typecheck before declaring a change done (bunx turbo run typecheck --filter=<pkg>)
5. When done, clean up

Use the stale-worktree-cleanup skill when worktrees accumulate. It handles both git worktree remove and dropping the compdev_<slug> database in one pass. Never leave orphan databases — they pile up silently because git has no pre-worktree-remove hook.

Quick Reference

sh
# Spin up a new worktree (does env + DB + install + migrate + generate automatically)
git worktree add .worktrees/<slug> -b mariano/<branch-name> origin/main

# Start dev — ONLY in the worktree you're actively iterating on
cd .worktrees/<slug>
bun run dev

# Start dev in a background worktree (no trigger dev, custom port via .env.local)
echo "PORT=3001" >> apps/app/.env.local
bun run --filter '@trycompai/app' dev:no-trigger

# Clean up when branch is done
# (use the stale-worktree-cleanup skill)

Red Flags

If you catch yourself doing any of these, stop — the hook should have handled it:

  • Running bun install manually in a new worktree
  • cp or ln -s to copy .env files into a worktree
  • Writing a script that "creates a database for my branch"
  • Running bun run db:migrate in a worktree right after creating it
  • Ignoring a failing bun run dev in two worktrees instead of swapping to dev:no-trigger

Common Mistakes

MistakeFix
Creating the worktree from another worktree instead of the main cloneAlways cd to /Users/mariano/code/comp first
Editing .env in a worktree and expecting it to propagateIf it's a symlink, yes; if it's a real copy (has DATABASE_URL), no. Check with ls -la.
Forgetting to bump PORT → two dev servers collidePut PORT=<free-port> in the worktree's .env.local
Running trigger dev in multiple worktreesSwitch to dev:no-trigger in all but one
Not cleaning up → orphan compdev_* databases piling upUse the stale-worktree-cleanup skill regularly

© trycompai, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/new-feature-setup of trycompai/comp.

Open the folder on GitHubat commit 1bf4d52

Compare with similar skills

New Feature Setup next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

New Feature Setup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
New Feature Setup this skilltrycompai/comp2k—~1.4kAutomated safety check: NotesAGPL-3.0
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Migrate Core Code to Submodulestinyhumansai/openhuman41k—~2.6kAutomated safety check: PassGPL-3.0
Finishing A Development Branchfarm-fe/farm5.6k33 repos~1.8kAutomated safety check: PassMIT
Git Worktree Cleanuplobehub/lobehub83k—~2.8kAutomated safety check: PassCustom licence
Keep Codex Fastvibeforge1111/keep-codex-fast1.6k—~3.1kAutomated safety check: PassMIT

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    41k GitHub stars~2.6k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • A skill your agent uses when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for…

    5.6k GitHub starsUsed in 33 repos~1.8k tokens
    DevelopmentAuto-check passed
  • Git Worktree Cleanup

    lobehub/lobehub

    Audits stale Git worktrees and branches with a bundled script, classifies each one, and deletes only after you approve the exact candidates.

    83k GitHub stars~2.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Keep Codex Fast

    vibeforge1111/keep-codex-fast

    A skill your agent uses when Codex feels slow or bloated, when local sessions/logs/worktrees/config have grown over time, or when a user wants safe maintenance for Codex Desktop/CLI state.

    1.6k GitHub stars~3.1k tokensUpdated 5 mo ago
    DevelopmentAuto-check passed
  • Pre-Release PR Triage

    jamiepine/voicebox

    Sorts a backlog of open pull requests into must-merge, candidate, superseded and deferred, writes a triage doc and works the merge loop before a release.

    57k GitHub stars~3.1k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from trycompai/comp

All 31 skills in this repo
  • API Endpoint Contract

    trycompai/comp

    The contract every new or modified API endpoint must follow so it is correct for the public OpenAPI spec, the MCP server (npm @trycompai/mcp-server), the ValidationPipe, and the docs.

    2k GitHub stars~2.7k tokensUpdated 5 days ago
    Auto-check passed
  • Check Results Service

    trycompai/comp

    How to reuse ANY integration check's results in a feature via the universal CheckResultsService (apps/api integration-platform).

    2k GitHub stars~2.1k tokensUpdated 5 days ago
    Auto-check passed
  • Data

    trycompai/comp

    A skill your agent uses when implementing data fetching, API calls, server/client components, or SWR hooks

    2k GitHub stars~955 tokensUpdated 5 days ago
    Auto-check passed
  • A skill your agent uses when SDK generation failed or seeing errors.

    2k GitHub stars~938 tokensUpdated 5 days ago
    Auto-check passed
  • Forms

    trycompai/comp

    A skill your agent uses when building forms - covers React Hook Form, Zod validation, and form patterns

    2k GitHub stars~1k tokensUpdated 5 days ago
    Auto-check passed
  • Code

    trycompai/comp

    A skill your agent uses when writing TypeScript/React code - covers type safety, component patterns, and file organization

    2k GitHub stars~909 tokensUpdated 5 days ago
    Auto-check: warnings

Categories

Questions about New Feature Setup

What does New Feature Setup do?

A skill your agent uses when starting a new feature, Linear ticket, or bugfix in this repo — establishes the branch + worktree + env + DB + dev-server conventions so the work is immediately ready to…. New Feature Setup is an agent skill from trycompai/comp. Use when starting a new feature, Linear ticket, or bugfix in this repo — establishes the branch + worktree + env + DB + dev-server conventions so the work is immediately ready to code without fighting infra.

When should I use New Feature Setup?

New Feature Setup fits situations like: starting a new feature; start a new feature; spin up a worktree.

How do I install New Feature Setup in Claude Code?

Run `npx skills add trycompai/comp --skill new-feature-setup -a claude-code`. Or copy the skill folder (.agents/skills/new-feature-setup in trycompai/comp) into .claude/skills/new-feature-setup in your project. Claude Code loads it when a task matches its description.

How do I install New Feature Setup in Codex?

Run `npx skills add trycompai/comp --skill new-feature-setup -a codex`. Or copy the skill folder (.agents/skills/new-feature-setup in trycompai/comp) into .agents/skills/new-feature-setup in your project. Codex loads it when a task matches its description.

Can I use New Feature Setup in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add trycompai/comp --skill new-feature-setup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/new-feature-setup, .gemini/skills/new-feature-setup, .github/skills/new-feature-setup and .opencode/skills/new-feature-setup in your project.

What does New Feature Setup need to run?

Going by SKILL.md and its folder, New Feature Setup needs the command-line tools its instructions call (bun, git and bunx).

Does New Feature Setup access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is New Feature Setup safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does New Feature Setup use?

New Feature Setup is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does New Feature Setup use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to New Feature Setup?

Skills that share tags, products or a category with New Feature Setup: Finishing a Development Branch (obra/superpowers, 296k stars), Migrate Core Code to Submodules (tinyhumansai/openhuman, 41k stars), Finishing A Development Branch (farm-fe/farm, 5.6k stars) and Git Worktree Cleanup (lobehub/lobehub, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains New Feature Setup?

trycompai (a GitHub organization) maintains it in trycompai/comp, which has 2,016 GitHub stars. The repository holds 31 skills in this directory. The repository was last updated on October 2, 2026.

Source: trycompai/comp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.