session-management
Skill47 starsChanged 4 months agoMITView on GitHub
Use when a task spans multiple steps or sessions and needs structured state tracking — leverages the built-in SQLite session database for todos, dependencies, and batch operation progress.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- conorbronsdon/agent-skillstheir own version, first seen Aug 3, 2026
- KaanBicaklar/mona-sast-skillstheir own version, first seen Jul 9, 2026
- alinaqi/maggytheir own version, first seen Jun 12, 2026
- troyjthomas/ios-agent-skillstheir own version, first seen Apr 7, 2026
- EndogenAI/dogmatheir own version, first seen Mar 7, 2026
- rohitgarewal-code/claude-skillstheir own version, first seen Feb 26, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- alinaqi/maggy★ 707same name
- conorbronsdon/agent-skills★ 10same name
- EndogenAI/dogma★ 2same name
- KaanBicaklar/mona-sast-skills★ 2same name
- rohitgarewal-code/claude-skills★ 2same name
- troyjthomas/ios-agent-skills★ 2same name
- Willhong/claude_skill★ 0same name
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 repository111 other files it gives its agents.
- AGENTS.mdAGENTS.md
- COPILOT-INSTRUCTIONS.mdCopilot instructions
- .github/copilot-instructions.mdCopilot instructions
- ai-visibilitySkill
- content-strategySkill
- seoSkill
- actions-debuggingSkill
- agentic-engineeringSkill
- autopilot-patternsSkill
- background-agentSkill
- context-primeSkill
- copilot-memorySkill
- cross-session-memorySkill
- ecosystem-intakeSkill
- fleet-parallelSkill
- github-code-searchSkill
- github-codespaces-efficiencySkill
- github-issue-triageSkill
- github-pr-workflowSkill
- ide-switchingSkill
- knowledge-curatorSkill
- mcp-builderSkill
- mcp-ecosystemSkill
- multi-model-strategySkill
- plan-mode-masterySkill
- scope-guardSkill
- stack-detectorSkill
- sub-agent-sandboxingSkill
- task-intake-routerSkill
- team-plannerSkill
- token-cost-optimizerSkill
- api-and-interface-designSkill
- code-reviewSkill
- context-engineeringSkill
- cpp-debuggingSkill
- deprecation-and-migrationSkill
- diagnoseSkill
- fix-build-errorsSkill
- fix-github-issueSkill
- implementSkill
- improve-codebase-architectureSkill
- nestjs-prismaSkill
- nextjs-prismaSkill
- performance-optimizationSkill
- pr-multi-perspective-reviewSkill
- prototypeSkill
- react-vitestSkill
- receiving-code-reviewSkill
- refactor-cleanSkill
- reviewSkill
- skill-creatorSkill
- source-driven-developmentSkill
- spec-driven-developmentSkill
- systematic-debuggingSkill
- tdd-workflowSkill
- zoom-outSkill
- add-to-changelogSkill
- api-documentationSkill
- architecture-decisionsSkill
- code-tourSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 176
Descriptive IDs: Use kebab-case IDs like setup-db instead of t1 — they're self-documenting in query results.
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Session SQL Database Management
Why This is Copilot-Exclusive
Copilot CLI includes a built-in SQLite database per session accessible via a native sql
tool. It comes with pre-built todos and todo_deps tables and supports creating any custom
tables you need. This structured data layer enables proper task tracking, batch processing, and
state management — all queryable with SQL. Claude Code has no database; state management is
limited to reading/writing files or keeping everything in the conversation context.
When to Use
- Tracking progress on multi-step tasks with dependencies
- Batch-processing items (issues, files, test cases) with status tracking
- Storing intermediate results from analysis or exploration
- Managing key-value state across a complex workflow
- Building reports from structured data (test results, PR reviews, audit findings)
Workflow
1. Pre-Built Todo Tracking
The todos table is ready to use immediately:
-- Create todos for your task
INSERT INTO todos (id, title, description, status) VALUES
('setup-db', 'Set up database', 'Initialize Prisma schema with User and Post models', 'pending'),
('seed-data', 'Create seed data', 'Add development seed script with 10 users', 'pending'),
('api-routes', 'Build API routes', 'REST endpoints for User CRUD operations', 'pending');
-- Define dependencies
INSERT INTO todo_deps (todo_id, depends_on) VALUES
('seed-data', 'setup-db'),
('api-routes', 'setup-db');2. Track Progress as You Work
-- Start working on a todo
UPDATE todos SET status = 'in_progress', updated_at = datetime('now') WHERE id = 'setup-db';
-- Complete it
UPDATE todos SET status = 'done', updated_at = datetime('now') WHERE id = 'setup-db';
-- Check what's ready to start next
SELECT t.id, t.title FROM todos t
WHERE t.status = 'pending'
AND NOT EXISTS (
SELECT 1 FROM todo_deps td
JOIN todos dep ON td.depends_on = dep.id
WHERE td.todo_id = t.id AND dep.status != 'done'
);3. Custom Tables for Any Purpose
Test Case Tracking
CREATE TABLE test_cases (
id TEXT PRIMARY KEY,
name TEXT NOT NULL,
file_path TEXT,
status TEXT DEFAULT 'not_written',
notes TEXT
);
INSERT INTO test_cases (id, name, file_path) VALUES
('tc-login', 'User login flow', 'tests/auth/login.test.ts'),
('tc-register', 'User registration', 'tests/auth/register.test.ts'),
('tc-logout', 'User logout', 'tests/auth/logout.test.ts');
-- Track TDD progress
UPDATE test_cases SET status = 'written' WHERE id = 'tc-login';
SELECT * FROM test_cases WHERE status = 'not_written';Batch Processing
CREATE TABLE files_to_process (
path TEXT PRIMARY KEY,
action TEXT,
status TEXT DEFAULT 'pending',
result TEXT
);
-- Load files to process
INSERT INTO files_to_process (path, action) VALUES
('src/utils/string.ts', 'add-jsdoc'),
('src/utils/array.ts', 'add-jsdoc'),
('src/utils/date.ts', 'add-jsdoc');
-- Process one at a time
SELECT path, action FROM files_to_process WHERE status = 'pending' LIMIT 1;
UPDATE files_to_process SET status = 'done', result = 'Added 5 JSDoc comments' WHERE path = 'src/utils/string.ts';Key-Value State
CREATE TABLE session_state (key TEXT PRIMARY KEY, value TEXT);
INSERT OR REPLACE INTO session_state (key, value) VALUES
('current_phase', 'testing'),
('target_branch', 'feature/auth'),
('last_test_run', '2024-01-15T10:30:00Z');
SELECT value FROM session_state WHERE key = 'current_phase';Examples
Code Review Tracker
CREATE TABLE review_items (
id TEXT PRIMARY KEY,
file_path TEXT,
line_number INTEGER,
severity TEXT, -- 'critical', 'warning', 'suggestion'
comment TEXT,
status TEXT DEFAULT 'pending'
);
-- Copilot populates this during code review
INSERT INTO review_items (id, file_path, line_number, severity, comment) VALUES
('r1', 'src/auth.ts', 42, 'critical', 'SQL injection vulnerability in query'),
('r2', 'src/api.ts', 15, 'warning', 'Missing error handling for null case'),
('r3', 'src/utils.ts', 88, 'suggestion', 'Could use optional chaining here');
-- Work through issues by severity
SELECT * FROM review_items WHERE severity = 'critical' AND status = 'pending';
UPDATE review_items SET status = 'fixed' WHERE id = 'r1';
-- Progress dashboard
SELECT severity, status, COUNT(*) as count
FROM review_items
GROUP BY severity, status;Migration Tracking
CREATE TABLE migration_files (
source_path TEXT PRIMARY KEY,
target_path TEXT,
migration_type TEXT,
status TEXT DEFAULT 'pending',
errors TEXT
);
-- Track a JS → TS migration
INSERT INTO migration_files (source_path, target_path, migration_type) VALUES
('src/users.js', 'src/users.ts', 'js-to-ts'),
('src/orders.js', 'src/orders.ts', 'js-to-ts');
-- Summary
SELECT status, COUNT(*) FROM migration_files GROUP BY status;Tips
- Use the pre-built tables:
todosandtodo_depsare ready immediately — no setup needed for basic task tracking. - Descriptive IDs: Use kebab-case IDs like
setup-dbinstead oft1— they're self-documenting in query results. - Query for dashboards:
GROUP BY statusgives instant progress summaries. - Cross-reference tables: Join your custom tables with
todosfor rich tracking (e.g., link test cases to feature todos). - The database resets per session: Data doesn't persist across sessions. For persistent data, write results to files before ending your session.
- SQL is your reporting engine: Generate summaries, find outliers, and track patterns that would be impossible to manage in plain text.
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
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.

