Context-aware briefings, memory recall, knowledge graph queries, and intelligent recommendations for the secretary plugin
Generates context-aware briefings, recalls memories, queries knowledge graphs, and provides intelligent recommendations for work management.
npx claudepluginhub mwguerra/claude-code-pluginsThis skill is limited to using the following tools:
Provide context-aware assistance, intelligent briefings, memory recall, and knowledge graph queries.
# Main database
SECRETARY_DB_PATH="$HOME/.claude/secretary/secretary.db"
# Encrypted memory (sensitive data)
SECRETARY_MEMORY_DB_PATH="$HOME/.claude/secretary/memory.db"
# Scripts
PLUGIN_ROOT="$HOME/.claude/plugins/secretary"
Query and format a comprehensive briefing based on current context.
SELECT id, title, due_date, priority, project, status, stakeholder
FROM commitments
WHERE status IN ('pending', 'in_progress')
ORDER BY
CASE WHEN due_date IS NOT NULL AND due_date < date('now') THEN 0
WHEN due_date = date('now') THEN 1
WHEN due_date IS NOT NULL THEN 2
ELSE 3 END,
CASE priority WHEN 'critical' THEN 1 WHEN 'high' THEN 2 WHEN 'medium' THEN 3 ELSE 4 END;
SELECT id, title, category, created_at
FROM decisions
WHERE status = 'active'
AND (project = :current_project OR project IS NULL)
AND created_at >= datetime('now', '-7 days')
ORDER BY created_at DESC LIMIT 5;
SELECT id, title, progress_percentage, target_date, goal_type
FROM goals WHERE status = 'active'
ORDER BY
CASE WHEN target_date IS NOT NULL THEN 0 ELSE 1 END,
progress_percentage DESC
LIMIT 5;
SELECT id, title, idea_type, priority
FROM ideas WHERE status = 'captured'
ORDER BY created_at DESC LIMIT 5;
SELECT data FROM github_cache
WHERE id = 'combined' AND expires_at > datetime('now');
SELECT COUNT(*) as pending FROM queue WHERE status = 'pending';
When the user asks about past work, search across all knowledge stores.
-- Search decisions
SELECT d.id, d.title, d.description, d.rationale, d.category,
d.project, d.created_at
FROM decisions d
JOIN decisions_fts ON decisions_fts.rowid = d.rowid
WHERE decisions_fts MATCH :query AND d.status = 'active'
ORDER BY rank LIMIT 10;
-- Search commitments
SELECT c.id, c.title, c.description, c.priority, c.status,
c.project, c.created_at
FROM commitments c
JOIN commitments_fts ON commitments_fts.rowid = c.rowid
WHERE commitments_fts MATCH :query
ORDER BY rank LIMIT 10;
-- Search ideas
SELECT i.id, i.title, i.description, i.idea_type, i.status,
i.project, i.created_at
FROM ideas i
JOIN ideas_fts ON ideas_fts.rowid = i.rowid
WHERE ideas_fts MATCH :query
ORDER BY rank LIMIT 10;
-- Search knowledge nodes
SELECT kn.id, kn.name, kn.node_type, kn.description, kn.importance
FROM knowledge_nodes kn
JOIN knowledge_nodes_fts ON knowledge_nodes_fts.rowid = kn.rowid
WHERE knowledge_nodes_fts MATCH :query
ORDER BY rank LIMIT 10;
When FTS5 is too strict or the query contains special characters:
SELECT id, title, description, rationale, category, project, created_at
FROM decisions
WHERE status = 'active'
AND (title LIKE '%' || :query || '%'
OR description LIKE '%' || :query || '%'
OR rationale LIKE '%' || :query || '%')
ORDER BY created_at DESC LIMIT 10;
bash "$PLUGIN_ROOT/scripts/memory-manager.sh" search "query"
SELECT id, project, started_at, summary, duration_seconds / 60 as minutes
FROM sessions
WHERE summary LIKE '%' || :query || '%'
ORDER BY started_at DESC LIMIT 5;
SELECT
kn_target.name as related_entity,
kn_target.node_type as entity_type,
ke.relationship,
ke.strength
FROM knowledge_edges ke
JOIN knowledge_nodes kn_target ON kn_target.id = ke.target_node_id
WHERE ke.source_node_id = :entity_id
ORDER BY ke.strength DESC;
SELECT
CASE WHEN ke.source_node_id = :entity_id THEN kn_t.name ELSE kn_s.name END as connected_to,
CASE WHEN ke.source_node_id = :entity_id THEN kn_t.node_type ELSE kn_s.node_type END as type,
ke.relationship,
ke.strength
FROM knowledge_edges ke
JOIN knowledge_nodes kn_s ON kn_s.id = ke.source_node_id
JOIN knowledge_nodes kn_t ON kn_t.id = ke.target_node_id
WHERE ke.source_node_id = :entity_id OR ke.target_node_id = :entity_id
ORDER BY ke.strength DESC;
SELECT
kn1.name as entity_a,
ke1.relationship as rel_1,
kn_bridge.name as bridge,
ke2.relationship as rel_2,
kn2.name as entity_b
FROM knowledge_edges ke1
JOIN knowledge_nodes kn1 ON kn1.id = ke1.source_node_id
JOIN knowledge_nodes kn_bridge ON kn_bridge.id = ke1.target_node_id
JOIN knowledge_edges ke2 ON ke2.source_node_id = kn_bridge.id
JOIN knowledge_nodes kn2 ON kn2.id = ke2.target_node_id
WHERE kn1.name LIKE '%' || :entity_a || '%'
AND kn2.name LIKE '%' || :entity_b || '%';
Determine what is relevant to current work:
-- Recent sessions in this project
SELECT id, started_at, summary, branch, duration_seconds / 60 as minutes
FROM sessions
WHERE project = :current_project AND status = 'completed'
ORDER BY started_at DESC LIMIT 3;
-- Active decisions for this project
SELECT id, title, category FROM decisions
WHERE project = :project AND status = 'active'
ORDER BY created_at DESC LIMIT 10;
-- Pending commitments for this project
SELECT id, title, due_date, priority FROM commitments
WHERE project = :project AND status IN ('pending', 'in_progress')
ORDER BY priority DESC, due_date ASC;
-- Projects with shared concerns
SELECT DISTINCT d1.project as this_project, d2.project as related_project,
d1.category, COUNT(*) as shared_categories
FROM decisions d1
JOIN decisions d2 ON d1.category = d2.category AND d1.project != d2.project
WHERE d1.project = :current_project AND d1.status = 'active' AND d2.status = 'active'
GROUP BY d2.project, d1.category
ORDER BY shared_categories DESC;
SELECT
(SELECT COUNT(*) FROM commitments WHERE status IN ('pending', 'in_progress')) as pending_commitments,
(SELECT COUNT(*) FROM commitments WHERE status = 'pending' AND due_date < date('now')) as overdue,
(SELECT COUNT(*) FROM decisions WHERE status = 'active') as active_decisions,
(SELECT COUNT(*) FROM ideas WHERE status = 'captured') as idea_inbox,
(SELECT COUNT(*) FROM goals WHERE status = 'active') as active_goals,
(SELECT COUNT(*) FROM queue WHERE status = 'pending') as queue_pending,
(SELECT COUNT(*) FROM sessions WHERE date(started_at) = date('now')) as sessions_today;
# Secretary Briefing
**Project:** {project} | **Date:** {date} ({day_of_week})
## Attention Needed
### Overdue
- [C-0001] Fix bug - 2 days overdue
### Due Today
- [C-0003] Review PR
## Context
### Recent Decisions (this project)
- [D-0015] Use Redis for caching
### Active Goals
- [G-0001] MVP Launch [=========-] 90%
### Ideas Inbox
- [I-0010] GraphQL migration (exploration)
---
*Use `/secretary:track` to manage commitments*
# Recall: "{query}"
## Decisions (3 found)
- [D-0015] Use Redis for caching (Jan 25)
Rationale: Better performance, built-in TTL
- [D-0012] Cache invalidation strategy (Jan 20)
## Commitments (1 found)
- [C-0030] Implement caching layer - In Progress
## Ideas (1 found)
- [I-0008] Cache warming on deploy - Captured
## Related Sessions
- Jan 25: Caching discussion (45 min) - claude-code-plugins
## Knowledge Graph
- Redis -> used by -> api-service, claude-code-plugins
- Redis -> related to -> Memcached
# Secretary Status
| Category | Count |
|----------|-------|
| Pending Commitments | 12 |
| Overdue | 3 |
| Active Decisions | 28 |
| Ideas Inbox | 7 |
| Active Goals | 3 |
| Queue Pending | 0 |
/secretary:briefing - Generate a full context briefing/secretary:status - Show dashboard with counts and overview/secretary:memory - Search and manage encrypted memory entries/secretary:search - Search across all knowledge stores/secretary:track - View and manage commitments/secretary:graph - Explore knowledge graph relationshipsCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.