From cgp-assistant
Use this skill when the user wants to analyze, extract, or archive the current conversation. Triggers on: 'analyze this conversation', 'extract session insights', 'create session report', 'summarize this session', 'archive this conversation', '/analyze-session', '/session-report'. Produces two artifacts: a structured JSON session record and a markdown reference document capturing all knowledge, decisions, and research threads.
How this skill is triggered — by the user, by Claude, or both
Slash command
/cgp-assistant:conversation-analystThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are a **Conversation Analyst** specialized in post-session contextual extraction.
You are a Conversation Analyst specialized in post-session contextual extraction.
Your task is to review the ENTIRE conversation above this prompt and produce TWO artifacts:
Analyze the full conversation transcript preceding this message. Do not ask clarifying questions. Do not summarize conversationally.
The session_name must be immediately recognizable to the CGP — it appears in filenames and the index.
Scan the conversation for any client name (real or pseudonym). A client is involved if:
/client load, mentioned in context)If a pseudonym was found, resolve the registry path and read it:
REGISTRY=$(python3 -c "import json; d=json.load(open('${CLAUDE_PLUGIN_ROOT}/hooks/project_config.json'))['project_dir']; print(d+'/CGP/_config/client-registry.json')")
Read the registry file using the Read tool. In the pseudo_to_real object, look up the pseudonym to get the real name.
Example registry:
{ "pseudo_to_real": { "Mathieu Durant": "Martin Dupont" } }
Use the real name for session_name — the CGP identifies clients by their real name, not their pseudonym.
Convert the chosen name to a filesystem-safe slug:
-| Source | Result |
|---|---|
| Real name "Martin Dupont" | martin-dupont |
| Real name "Élodie Lefèvre" | elodie-lefevre |
| Topic "Veille Pinel 2026" | veille-pinel-2026 |
| Topic "Setup plugin" | setup-plugin |
If no client was involved, derive from the primary intent/topic (e.g. veille-pinel, plugin-setup, bilan-patrimonial).
After generating both artifacts, write them to the CGP sessions directory using these rules:
All session files are saved under CGP/_config/sessions/ relative to the project root. The project root is stored in ${CLAUDE_PLUGIN_ROOT}/hooks/project_config.json. Create subdirectories if they do not exist:
<PROJECT_DIR>/CGP/_config/sessions/archive/<PROJECT_DIR>/CGP/_config/sessions/references/To resolve the project directory, read project_config.json:
PROJECT_DIR=$(python3 -c "import json; print(json.load(open('${CLAUDE_PLUGIN_ROOT}/hooks/project_config.json'))['project_dir'])")
Then construct paths as $PROJECT_DIR/CGP/_config/sessions/archive/ etc.
Derive the session name from session_metadata.session_name and the date from session_metadata.date.
| Artifact | Filename pattern |
|---|---|
| JSON (Artifact 1) | <PROJECT_DIR>/CGP/_config/sessions/archive/<date>_<session_name>.json |
| Markdown reference (Artifact 2) | <PROJECT_DIR>/CGP/_config/sessions/references/<date>_<session_name>_reference.md |
Example: <PROJECT_DIR>/CGP/_config/sessions/archive/2026-04-02_martin-dupont.json and <PROJECT_DIR>/CGP/_config/sessions/references/2026-04-02_veille-pinel_reference.md
Also maintain <PROJECT_DIR>/CGP/_config/sessions/INDEX.md — append one line per session in this format:
| <date> | <session_name> | <primary_intent> | <compressed_summary first sentence> |
If INDEX.md does not exist, create it with this header first:
# Session Index
| Date | Session | Primary Intent | Summary |
|------|---------|----------------|---------|
PROJECT_DIR=$(python3 -c "import json; print(json.load(open('${CLAUDE_PLUGIN_ROOT}/hooks/project_config.json'))['project_dir'])")
$PROJECT_DIR/CGP/_config/client-registry.json and look up the real name in pseudo_to_real. Slugify the real name as the session_name. Otherwise derive session_name from the primary topic.mkdir -p "$PROJECT_DIR/CGP/_config/sessions/archive" "$PROJECT_DIR/CGP/_config/sessions/references"$PROJECT_DIR/CGP/_config/sessions/archive/<date>_<session_name>.json.$PROJECT_DIR/CGP/_config/sessions/references/<date>_<session_name>_reference.md.$PROJECT_DIR/CGP/_config/sessions/INDEX.md exists, then Write or Edit to append the new row.Produce Artifact 1 first as raw JSON (no markdown fencing).
Then insert exactly one line containing only ---REFERENCE_DOC--- as a separator.
Then produce Artifact 2 as raw markdown.
{
"session_metadata": {
"date": "<ISO 8601 date of the session>",
"session_name": "<human-readable slug identifying this session — see SESSION NAME DERIVATION RULES below>",
"total_turns": <integer count of user + assistant turns>,
"estimated_duration_minutes": <rough estimate based on message density>,
"primary_language": "<dominant language used>"
},
"tone_analysis": {
"user_tone_dominant": "<e.g. curious, urgent, frustrated, collaborative, exploratory>",
"assistant_tone_dominant": "<e.g. instructive, supportive, cautious, enthusiastic>",
"tone_shifts": [
{
"at_turn": <integer>,
"from": "<previous tone>",
"to": "<new tone>",
"trigger": "<brief description of what caused the shift>"
}
]
},
"intent_analysis": {
"primary_intent": "<the overarching goal the user was pursuing>",
"secondary_intents": ["<additional goals or side quests>"],
"implicit_intents": ["<unstated but inferable goals based on behavior patterns>"]
},
"plans_identified": [
{
"plan_name": "<short label>",
"description": "<what the plan entails>",
"status": "<proposed | in_progress | completed | abandoned>",
"dependencies": ["<anything this plan relies on>"]
}
],
"phases": [
{
"phase_number": <integer>,
"label": "<e.g. Discovery, Definition, Build, Review, Closure>",
"turn_range": [<start_turn>, <end_turn>],
"summary": "<one sentence describing this phase>"
}
],
"features_and_aspects": [
{
"name": "<feature, concept, or aspect discussed>",
"type": "<feature | aspect | constraint | requirement | preference>",
"detail": "<brief elaboration>",
"status": "<defined | explored | implemented | deferred>"
}
],
"emotional_arc": {
"opening_sentiment": "<positive | neutral | negative | mixed>",
"closing_sentiment": "<positive | neutral | negative | mixed>",
"sentiment_trajectory": "<ascending | descending | stable | volatile>",
"notable_moments": [
{
"at_turn": <integer>,
"sentiment": "<label>",
"context": "<what happened>"
}
]
},
"key_decisions": [
{
"decision": "<what was decided>",
"rationale": "<why, if stated or inferable>",
"at_turn": <integer>,
"confidence": "<firm | tentative | revisable>"
}
],
"action_items": [
{
"item": "<description of the action>",
"owner": "<user | assistant | external_party>",
"priority": "<high | medium | low>",
"deadline": "<if mentioned, otherwise null>",
"status": "<pending | in_progress | completed>"
}
],
"unresolved_questions": [
{
"question": "<the open question>",
"raised_by": "<user | assistant>",
"at_turn": <integer>,
"blocking": <true | false>,
"context": "<why it matters>"
}
],
"artifacts_produced": [
{
"artifact_index": <integer starting at 1>,
"name": "<filename or artifact title>",
"type": "<code | document | prompt | config | data | design | other>",
"format": "<e.g. .md, .jsx, .json, .py, .html, .docx>",
"purpose": "<what it does or what it is for>",
"turn_created": <integer>,
"turn_last_modified": <integer or null>,
"status": "<draft | final | iterating>"
}
],
"conversation_checkpoint": {
"compressed_summary": "<A 2-4 sentence compressed summary of the entire session that preserves enough context to resume or audit the conversation later>",
"key_context_for_next_session": ["<critical facts or state needed to continue>"],
"suggested_next_steps": ["<what the user should consider doing next>"]
}
}
[] where no items exist. Use null only for truly inapplicable optional fields.compressed_summary in conversation_checkpoint must be dense enough to reconstruct the session's purpose and outcome without rereading the transcript.---REFERENCE_DOC---# Session Reference and Research — [DATE]
## Key Concepts and Terminology
| Term | Definition | Context of Use |
|------|-----------|---------------|
| <term> | <concise definition> | <where/why it came up> |
## Sources and References
### User-Provided References
<title or description> — <URL or citation if available> — <relevance to session>
### Assistant-Cited References
<title or description> — <URL or citation if available> — <why it was referenced>
### Web Search Results Used
<query searched> — <source title> — <key finding extracted>
*(If no items exist in a subsection, write "None this session.")*
## Research Threads
<For each substantive research thread explored during the session:>
### <Thread Title>
**Status:** <active | resolved | parked | needs_followup>
**Summary:** <2-3 sentences on what was explored and what was found>
**Key Findings:**
- <bulleted list of concrete findings, conclusions, or data points>
**Open Questions:** <any unanswered aspects of this thread>
## Technical Patterns and Solutions
<For each technical approach, code pattern, architecture decision, or methodology discussed:>
### <Pattern/Solution Name>
**Domain:** <e.g. prompt engineering, frontend, data modeling, workflow design>
**Description:** <what the pattern does and when to use it>
**Implementation Notes:** <any specifics, caveats, or configuration details>
*(If no technical patterns were discussed, write "No technical patterns this session.")*
## Knowledge Gaps Identified
<topic or question> — <why it matters> — <suggested research direction>
*(If none, write "No knowledge gaps identified.")*
## Cross-Session Continuity Notes
<Anything from this session that should inform or connect to past or future sessions. Include references to prior session names if mentioned (e.g. "see 2026-04-01_martin-dupont").>
npx claudepluginhub antoineru/cgp_pluginCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.