Install
$ agentstack add skill-popschlock-claude-harness-generator-upgrade-environment ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Critical
This skill is a TRIGGER. It inventories the target environment and writes UPGRADE_CONTEXT.md, then returns control to the orchestrator. It does NOT run the analysis, interview, or implementation -- the orchestrator coordinates those steps.
What this skill does
- Get target path (offer current directory if it has
.claude/) - Verify environment exists (must have
.claude/+CLAUDE.md) - Quick inventory: count rules, agents, skills, check for Docs/ structure
- Check for GENESIS.md and ARCHITECTURE.md (richer context if present)
- Write
/Docs/Environment/UPGRADE_CONTEXT.mdwith inventory + platform info - Return to orchestrator
Steps
Step 1: Get the target directory
Ask the user for the path to the environment to upgrade. If the current directory contains a .claude/ directory and CLAUDE.md, offer to use it.
Step 2: Verify environment exists
The target MUST have both:
.claude/directoryCLAUDE.mdfile
If either is missing, report "No complete Claude Code environment found at this path" and stop. An environment must exist before it can be upgraded.
Step 3: Quick inventory
Count and list:
- Rule files: glob
.claude/rules/*.md-- count and list names - Agent files: glob
.claude/agents/*.md-- count and list names - Skill directories: glob
.claude/skills/*/SKILL.md-- count and list names - Docs structure: check for
Docs/index.md,Docs/GETTING_STARTED.md,Docs/_working/ - Settings: check for
.claude/settings.json,.claude/settings.local.json - Hooks: check for
.claude/hooks.jsonor hook entries in settings.json - VCS ignore: check for
.gitignore,.p4ignore
Step 4: Check for GENESIS.md and ARCHITECTURE.md
Look for /Docs/Environment/GENESIS.md and /Docs/Environment/ARCHITECTURE.md. These provide richer context for the upgrade analysis but are not required (the environment may not have been created by the Harness Generator).
Also check for /Docs/Environment/VALIDATION_REPORT.md -- a recent validation gives the analyzer a head start.
Step 4a: Detect hub shape
Apply these tests in order. First match wins.
Test 1 -- declared hub: If /Docs/Environment/HUB_GENESIS.md exists, record Shape: HUB. Read its work-area registry and for each listed area-slug record whether //Docs/Environment/GENESIS.md and ARCHITECTURE.md exist (registry-vs-disk drift).
Test 2 -- single environment: If /.claude/ AND /CLAUDE.md both exist, record Shape: SINGLE. Do NOT look deeper. A single environment may have unrelated subfolders that contain their own unrelated Claude setups (e.g., a vendored library with its own CLAUDE.md), and those should not be treated as work areas.
Test 3 -- undeclared hub: ALL of the following must hold:
/.claude/does NOT exist at the root/CLAUDE.mddoes NOT exist at the root/Docs/Environment/HUB_GENESIS.mddoes NOT exist- Two or more immediate subdirectories of `` each contain their own
.claude/ directory AND a CLAUDE.md file
- Those subdirectory environments are sibling peers (common parent is ``,
not grandparent-and-below)
If all hold, record Shape: HUB_LIKE_UNDECLARED and list the qualifying subfolders. Offer Declare hub structure in the upgrade recommendations.
Test 4 -- empty target: If none of the above matches, report "No Claude Code environment found at this path" and stop. Do not attempt to upgrade an empty directory.
Why the tests are ordered this way
- Declared hubs (Test 1) are unambiguous -- HUB_GENESIS.md is the declaration.
- Single environments (Test 2) must be detected BEFORE undeclared-hub because a
single env with noise in subfolders should stay single. Only match HUBLIKEUNDECLARED when there is NO env at the root.
- Two sibling envs is the minimum for "hub-like" -- one sibling is just a
single env with an odd parent.
- Deeper nesting (e.g.,
/a/b/c/.claude/) is ignored; hubs are
parent + immediate children only.
Step 5: Create environment directory
Create /Docs/Environment/ if it does not exist.
Step 6: Write UPGRADE_CONTEXT.md
Write to /Docs/Environment/UPGRADE_CONTEXT.md:
# Upgrade Context
Created:
## Target
- Path:
- Platform:
## Inventory
- Rules: ()
- Agents: ()
- Skills: ()
- Docs structure: (index.md: yes|no, GETTING_STARTED: yes|no, _working: yes|no)
- Settings: settings.json , settings.local.json
- Hooks: ()
- VCS ignore:
## Available Context
- GENESIS.md:
- ARCHITECTURE.md:
- HUB_GENESIS.md:
- HUB_ARCHITECTURE.md:
- VALIDATION_REPORT.md: ()
## Shape
- Shape:
- Work areas (hub only):
## CLAUDE.md Stats
- Line count: (hub: parent CLAUDE.md line count; per-area counts listed separately)
- Has first-run greeting:
- Has routing reference:
## Pipeline Status
- Stage: TRIGGER_COMPLETE
- Next: USER_INTERVIEW
Step 7: Output summary
Report to the user:
- Environment found at target path
- Quick inventory summary (N rules, N agents, N skills)
- Whether GENESIS.md/ARCHITECTURE.md were found (richer analysis if present)
- "The upgrade analysis pipeline will now begin."
The orchestrator reads UPGRADE_CONTEXT.md and coordinates: user interview -> structural pre-check -> deep analysis -> recommendations -> implementation -> validation.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Popschlock
- Source: Popschlock/Claude-Harness-Generator
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.