agentleFS
onelastcommitonelastcommit/noctra/.claude/skills/setup-and-config/SKILL.md

setup-and-config

Skill4 starsChanged 29 days agoMITView on GitHub

Use when installing or configuring Noctra, running the setup wizard, editing .env, declaring repos via the Linear project Repo: directive, resolving config directory behavior, or preparing local, Docker, or cloud runtime config.

  • Reads credentials
  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 1

    1. ahmadAlMezaal/noctra★ 3100% same

    Edited · 0

    None found.

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository11 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this playbook when installing Noctra, generating config, editing .env, or debugging where config is loaded from.

    line 8
  2. Very specific:

    Use AGENT_BACKEND=codex when running Codex instead of Claude.

    line 43
  3. Very specific:

    If a project has no Repo: directive, REPO_PATH is used as a single-repo fallback when set.

    line 60
  4. Very specific:

    If neither a directive nor REPO_PATH exists, Noctra skips the ticket and comments on Linear.

    line 61
  5. Distinctive:

    Default per-user config lives at:

    line 65
  6. Distinctive:

    After setup or config edits:

    line 169

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Setup And Config Noctra

Use this playbook when installing Noctra, generating config, editing .env, or debugging where config is loaded from.

Fast Local Setup

go install github.com/onelastcommit/noctra/cmd/noctra@latest
claude            # or: codex login
gh auth login
noctra setup
noctra doctor
noctra

The setup wizard prompts for the agent backend, Linear API key, trigger configuration, and optional Gemini and Telegram settings. It writes .env only — repos are declared per-project in Linear.

Manual Setup

cp .env.example .env

Repos are routed per-ticket from the Linear project's description (Repo: owner/name, optional Branch:).

Then fill in the required values:

LINEAR_API_KEY=...
LINEAR_TEAM_KEY=ENG
AGENT_BACKEND=claude
TRIGGER_MODE=state
TRIGGER_STATE=Next
IN_REVIEW_STATE=In Review
MAIN_BRANCH=main

Use AGENT_BACKEND=codex when running Codex instead of Claude.

Repo Routing

Noctra chooses the target repository per-ticket from a Repo: directive in the ticket's Linear project description (or content body):

Repo: your-org/auth-service
Branch: main

Rules:

  1. owner/name shorthand expands to a GitHub HTTPS URL; full https:// / git@ URLs are used verbatim (so SSH and non-GitHub hosts work).
  2. Branch: is optional and falls back to the repo's default branch (then MAIN_BRANCH).
  3. Repos are cloned on demand into ~/.noctra-repos/ unless REPOS_BASE overrides it.
  4. Worktrees are created under ~/.noctra-worktrees/ unless WORKTREE_BASE overrides it.
  5. If a project has no Repo: directive, REPO_PATH is used as a single-repo fallback when set.
  6. If neither a directive nor REPO_PATH exists, Noctra skips the ticket and comments on Linear.

Config Directory Resolution

Default per-user config lives at:

~/.noctra/.env
~/.noctra/logs/

During development, a checkout-local config is used when the current directory contains any of:

.env
.env.example
go.mod

This lets go run and local binaries use checkout files without touching ~/.noctra/.

The relevant implementation is:

  1. resolveScriptDir() in cmd/noctra/main.go for runtime config root selection.
  2. config.DefaultConfigDir() in internal/config for the per-user default.

Important Env Vars

Core:

LINEAR_API_KEY=
LINEAR_TEAM_KEY=ENG
AGENT_BACKEND=claude
TRIGGER_MODE=state
TRIGGER_STATE=Next
TRIGGER_LABEL=
IN_REVIEW_STATE=In Review
REPO_PATH=
MAIN_BRANCH=main
MAX_CONCURRENT=3
POLL_INTERVAL=30

Safety guards:

MAX_DISPATCHES=40
MAX_RETRIES=3
AGENT_TIMEOUT_MINUTES=45

MAX_DISPATCHES is a per-UTC-day cap: when hit, new dispatches pause and auto-resume at midnight (the process keeps running); 0 = unlimited. It's a coarse activity cap — actual token/$ spend is bounded by the budget caps (MAX_DAILY_TOKENS / MAX_DAILY_USD).

Quality controls:

USE_AGENT_TEAMS=false
GEMINI_API_KEY=
GEMINI_MODEL=gemini-2.5-pro
MAX_REVIEW_RETRIES=1

Auto-iterate:

AUTO_ITERATE_PRS=false
MAX_PR_ITERATIONS=3
PR_POLL_INTERVAL=120
TRUSTED_REVIEWERS=

Telegram:

TELEGRAM_ENABLED=false
TELEGRAM_BOT_TOKEN=
TELEGRAM_CHAT_ID=
VERBOSE_NOTIFICATIONS=false   # TELEGRAM_VERBOSE honored as deprecated alias

Container and cloud overrides:

REPOS_BASE=/data/repos
WORKTREE_BASE=/data/worktrees
LOG_DIR=/data/logs
STATE_DB=/data/state.db
GH_TOKEN=
GIT_USER_NAME=Noctra
GIT_USER_EMAIL=noctra@example.local

Docker And Cloud Config

Containers should use API keys and tokens because interactive CLI login is not available:

LINEAR_API_KEY=...
AGENT_BACKEND=claude
ANTHROPIC_API_KEY=...
GH_TOKEN=...

Declare each repo with an HTTPS URL (or owner/name) in its Linear project's Repo: directive so GH_TOKEN authenticates the clone. This works on every host, including PaaS that can't mount files — there's no registry file to supply.

Preflight

After setup or config edits:

noctra doctor

Confirm:

  1. The selected backend CLI is installed and authenticated.
  2. gh is authenticated.
  3. Linear API access works.
  4. Repo URLs are reachable.
  5. State or label names match Linear exactly.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.