skills/session-start/SKILL.md
Use at the beginning of every work session - establishes context by checking GitHub project state, reading memory, verifying environment, and orienting before starting work
npx skillsauth add troykelly/codex-skills session-startInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Get your bearings before doing any work. Every session starts here.
Core principle: Understand the current state before taking action.
Announce at start: "I'm using session-start to get oriented before beginning work."
Execute these steps in order at the start of every session:
Verify required tools and environment variables are available.
# Check GitHub CLI authentication
gh auth status
# Check git is available
git --version
# Verify GITHUB_PROJECT is set
echo $GITHUB_PROJECT
If any check fails: Report to user before proceeding.
Skill: environment-bootstrap
Check for available development services (docker-compose).
# Detect compose services
if [ -f "docker-compose.yml" ] || [ -f ".devcontainer/docker-compose.yml" ]; then
docker-compose config --services
docker-compose ps
fi
Key questions:
If services are available but not running:
# Start all services
docker-compose up -d
# Or start specific service
docker-compose up -d postgres
Skill: local-service-testing
Understand the current state of the repository.
# Current branch
git branch --show-current
# Working directory status
git status
# Recent commits
git log --oneline -5
# Any stashed changes?
git stash list
Key questions:
Check the current state of work via the GitHub Project Board (the source of truth).
# Verify project is accessible
gh project view "$GITHUB_PROJECT_NUM" --owner "$GH_PROJECT_OWNER" --format json
# Get all project items with their status
gh project item-list "$GITHUB_PROJECT_NUM" --owner "$GH_PROJECT_OWNER" --format json | \
jq '.items[] | {number: .content.number, title: .content.title, status: .status.name}'
Key questions:
Query by status:
# Get Ready issues (work available)
gh project item-list "$GITHUB_PROJECT_NUM" --owner "$GH_PROJECT_OWNER" --format json | \
jq -r '.items[] | select(.status.name == "Ready") | .content.number'
# Get In Progress issues
gh project item-list "$GITHUB_PROJECT_NUM" --owner "$GH_PROJECT_OWNER" --format json | \
jq -r '.items[] | select(.status.name == "In Progress") | .content.number'
# Get Blocked issues
gh project item-list "$GITHUB_PROJECT_NUM" --owner "$GH_PROJECT_OWNER" --format json | \
jq -r '.items[] | select(.status.name == "Blocked") | .content.number'
MANDATORY: Verify project board state matches actual work state.
# Check for sync issues between project board and reality
echo "## Project Board Sync Check"
echo ""
# 1. Issues marked "In Progress" should have active branches
echo "### Checking: In Progress issues have branches"
for issue in $(gh project item-list "$GITHUB_PROJECT_NUM" --owner "$GH_PROJECT_OWNER" \
--format json | jq -r '.items[] | select(.status.name == "In Progress") | .content.number'); do
branch=$(git branch -r 2>/dev/null | grep -E "feature/$issue-" | head -1)
if [ -z "$branch" ]; then
echo "⚠️ Issue #$issue is 'In Progress' but has no branch"
fi
done
# 2. Active branches should have issues marked "In Progress"
echo ""
echo "### Checking: Active branches have In Progress issues"
for branch in $(git branch -r 2>/dev/null | grep -E 'origin/feature/[0-9]+' | sed 's/.*feature\///' | cut -d- -f1 | sort -u); do
status=$(gh project item-list "$GITHUB_PROJECT_NUM" --owner "$GH_PROJECT_OWNER" \
--format json | jq -r ".items[] | select(.content.number == $branch) | .status.name")
if [ "$status" != "In Progress" ] && [ "$status" != "In Review" ]; then
echo "⚠️ Branch for #$branch exists but project Status='$status' (expected: In Progress or In Review)"
fi
done
# 3. Open PRs should have issues marked "In Review"
echo ""
echo "### Checking: Open PRs have In Review issues"
for pr in $(gh pr list --json number,body --jq '.[] | select(.body | contains("Closes #")) | .body' 2>/dev/null | grep -oE 'Closes #[0-9]+' | grep -oE '[0-9]+'); do
status=$(gh project item-list "$GITHUB_PROJECT_NUM" --owner "$GH_PROJECT_OWNER" \
--format json | jq -r ".items[] | select(.content.number == $pr) | .status.name")
if [ "$status" != "In Review" ]; then
echo "⚠️ Issue #$pr has open PR but project Status='$status' (expected: In Review)"
fi
done
echo ""
echo "Sync check complete."
If sync issues found:
Skill: project-board-enforcement
CRITICAL: Check if autonomous orchestration was running and needs to resume.
# Check MCP Memory for active orchestration marker
ACTIVE_ORCH=$(mcp__memory__open_nodes({"names": ["ActiveOrchestration"]}))
If ActiveOrchestration entity exists:
## ⚠️ ACTIVE ORCHESTRATION DETECTED
**Status:** [from entity]
**Scope:** [from entity]
**Tracking Issue:** #[from entity]
**Last Loop:** [from entity]
**Repository:** [from entity]
### Action Required
Context was compacted mid-orchestration. Resuming now.
1. Verify tracking issue still exists
2. Resume orchestration via `autonomous-orchestration` skill
3. Continue from current phase (BOOTSTRAP or MAIN_LOOP)
Resume orchestration immediately - do not wait for user input. The original request for autonomous operation is still the active consent.
If no ActiveOrchestration entity: Continue to Step 4.
Search for relevant context from previous sessions.
Episodic Memory:
Knowledge Graph (mcp__memory):
Skill: memory-integration
Determine if there's work in progress to resume.
Indicators of active work:
If active work detected:
issue-driven-development processIf starting fresh or environment needs setup:
# Run init script if it exists
if [ -f scripts/init.sh ]; then
./scripts/init.sh
fi
# Or common alternatives
pnpm install --frozen-lockfile # Node projects
pip install # Python projects
Verify basic functionality works before starting new work.
Skill: environment-bootstrap
Summarize current state to user:
## Session State
**Repository:** [owner/repo]
**Branch:** [current branch]
**Working Directory:** [clean/dirty]
**Active Work:**
- Issue: #[number] - [title]
- Status: [project status]
- Progress: [what's been done]
**Environment:**
- [tool versions]
- [any issues detected]
**Development Services:**
- postgres: [running/stopped] @ localhost:5432
- redis: [running/stopped] @ localhost:6379
- [other services from docker-compose]
**Ready to:** [resume work on X / start new issue / await instructions]
Start Session
│
▼
┌─────────────────┐
│ Environment OK? │──No──► Report issues, await fix
└────────┬────────┘
│ Yes
▼
┌─────────────────┐
│ On main branch? │──Yes──► Ready for new work
└────────┬────────┘
│ No
▼
┌─────────────────┐
│ Uncommitted │──Yes──► Resume in-progress work
│ changes exist? │
└────────┬────────┘
│ No
▼
┌─────────────────┐
│ Issue marked │──Yes──► Resume in-progress work
│ In Progress? │
└────────┬────────┘
│ No
▼
Ready for new work
If resuming work from a previous session:
issue-driven-development stepsThen continue from the appropriate step in issue-driven-development.
If no work in progress:
issue-driven-development from Step 1| Issue | Resolution |
|-------|------------|
| GITHUB_PROJECT not set | Ask user for project URL |
| Not authenticated to gh | Run gh auth login |
| Dirty working directory on main | Stash or discard before proceeding |
| Issue "In Progress" but branch deleted | Reset issue status, start fresh |
Before proceeding to work:
Skill: project-board-enforcement
After session-start completes, proceed to either:
issue-driven-developmentissue-driven-development from Step 1Always operate under autonomous-operation mode.
data-ai
Defines behavior protocol for spawned worker agents. Injected into worker prompts. Covers startup, progress reporting, exit conditions, and handover preparation.
development
Defines context handover format when workers hit turn limit. Posts structured handover to GitHub issue comments enabling replacement workers to continue seamlessly.
data-ai
Use to spawn isolated worker processes for autonomous issue work. Creates git worktrees, constructs worker prompts, and handles worker lifecycle.
tools
Entry point for ALL work requests - triages scope from trivial to massive, asks clarifying questions, and routes to appropriate planning skills. Use this when receiving any new work request.