Skip to content
Back to skills

Session Setup

ASecurity

Configure the project's Claude Code settings for Software Factory runs. Sets the auto-compact threshold and an allowlist of exact read-only and stack commands, after showing the diff and asking. Claude Code only.

  • 11 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
developmentpythonrustgobashgit

Works with

  • claude code

Security analysis

A100/100

Scanned November 24, 2026

npx -y skills add achisolomon/open-software-factory --skill session-setup --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Session Setup?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Session Setup
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/achisolomon-session-setup-open-software-factory/badge)](https://www.skillsdirectory.com/skills/achisolomon-session-setup-open-software-factory)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: session-setup
description: Configure the project's Claude Code settings for Software Factory runs. Sets the auto-compact threshold and an allowlist of exact read-only and stack commands, after showing the diff and asking. Claude Code only.
argument-hint: "[auto-compact percent]"
disable-model-invocation: true
---

# Session setup (Claude Code only)

Act as the Team Lead.

Goal: fewer permission prompts and a safe auto-compact threshold, written to the PROJECT's `.claude/settings.json`. Merge into the existing file and keep every existing key. Show the diff and ask the user before writing. Never touch user-level settings.

1. **Auto-compact.** Set `env.CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` to the user's choice (the argument, or the `Auto-compact` preference in `docs/architecture/project-facts.md`), default `"30"`. It is a percent of the auto-compact window (range 1-100), it can only lower the threshold, it applies to the main session and subagents, and the session continues after compaction. Write it to the `.claude/settings.json` of the folder the user starts Claude Code from: when that is a parent of the project (a multi-repo workspace), the project's own settings file is not loaded. It takes effect in sessions started after the change.
2. **Exact-command allowlist** in `permissions.allow`, built from the stack's exact commands: test, lint, typecheck, build, format-check. Detect them from `package.json` scripts (use the runner the lockfile implies), `pyproject.toml`, `go.mod`, `Cargo.toml`, the Gradle wrapper and Makefile targets. Add:
   - read-only git: `git status`, `git diff:*`, `git log:*`, `git show:*`, `git worktree list`
   - read-only gh: `gh issue list:*`, `gh issue view:*`, `gh pr view:*`, `gh project item-list:*`, `gh project view:*`, `gh project field-list:*`, `gh label list:*`, `gh repo view:*`
   - each committed project runner script an agent named as `Team Lead → allowlist: Bash(<absolute path> *)` under `Handoffs:` (contract rule 9.15), exactly as named. Run this step again whenever a new one is named, not only at init.
   - the contract section 5 issue writes, only when `Tracking: github`: `gh issue create:*`, `gh issue comment:*`, `gh issue edit:*`, `gh issue close:*`, `gh issue reopen:*`, `gh label create:*`, `gh project item-add:*`, `gh project item-edit:*`
3. **Never allow** wildcards over script runners (`npm run:*`, `python:*`, `bash:*`) and never any command the gate hook asks on (push, deploy, apply, publish, recursive force delete, and so on).
4. Project `env` and `allow` take effect after the user trusts the folder.
5. **Tell the user:**
   - Start the Team Lead in auto mode: `claude --agent software-factory:team-lead --permission-mode auto`. (`defaultMode: auto` only works in user settings.) Auto mode drops broad allow rules, and the gate hook's ask still prompts.
   - After a few tasks, run the built-in `/fewer-permission-prompts` to harvest more exact read-only rules.
6. Record the chosen `Auto-compact` value in `project-facts.md` Preferences if it is not there.
7. **Retro Engine (once per machine).** STATE is `$SOFTWARE_FACTORY_HOME`, else `~/.software-factory`. If `<STATE>/retro-settings.json` does not exist, ask the user one question:
   - "Run the retro once a day, only for projects whose main changed? The first session of the day in a project starts it in the background, with that session's folder access." Options: yes or no.
   Do not offer auto-fix: the mode is always `draft`, and every fix waits for the user's yes. Write `{"mode": "draft"}` to `<STATE>/retro-settings.json`. On yes, run `python3 ${CLAUDE_PLUGIN_ROOT}/scripts/retro-schedule install` (the user approves it). On no, tell the user they can run `/software-factory:retro` any time.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.