Skip to content

spboyer/record-cli-session

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

CLI Session Recorder

A skill for GitHub Copilot CLI that records your sessions and generates comprehensive, shareable feedback for developer teams.

Why Use This?

The copilot --log-dir .logs --log-level debug command produces debug logs that are hard to read and share. This skill creates human-readable feedback with detailed tool call documentation and AI-generated summaries for analysis and debugging.

Installation

GitHub Copilot CLI

# Clone and install to skills directory
gh repo clone spboyer/record-cli-session
mkdir -p ~/.copilot/skills
cp -r record-cli-session/cli-session-recorder ~/.copilot/skills/

Or as a one-liner:

gh repo clone spboyer/record-cli-session -- --depth 1 && cp -r record-cli-session/cli-session-recorder ~/.copilot/skills/ && rm -rf record-cli-session

Usage

1. Start Recording

Use the explicit command or natural language:

/cli-session-recorder start

Or say: "record this session", "start recording", "capture feedback"

Copilot will confirm recording has started.

2. Work Normally

Just use Copilot as usual. Everything is captured automatically:

  • Your prompts (verbatim)
  • Copilot's responses
  • All tool calls with parameters and results
  • Errors and fixes
  • Timing information

3. Stop & Save

When you're done:

/cli-session-recorder stop

Or say: "stop recording", "save feedback"

Copilot will auto-generate a summary:

I've generated a summary of this session:

**Task**: Fix login authentication bug causing 401 errors
**Problems**: 
- Initial grep search returned too many results
- Had to inspect multiple files before finding the issue
**Outcome**: Success - Bug identified and fixed in src/auth.py

Accept this summary, or provide your own?

Just say "yes" to accept, or provide your own summary.

4. Share (Optional)

After saving, share via explicit commands:

/cli-session-recorder save           # Save to local file (default)
/cli-session-recorder save --gist    # Upload to GitHub Gist
/cli-session-recorder save --issue   # Create GitHub Issue

Output Format

The feedback file uses a comprehensive, human-readable format with detailed tool call documentation.

Example Output

## Copilot CLI Session Feedback

## Session Info

| Field | Value |
|-------|-------|
| **Session ID** | `6dd7f2b4-e68a-4bc7-9309-619ff917d7ed` |
| **Duration** | ~10 minutes (20:43 - 20:53 UTC) |
| **Date** | 2026-01-30 |
| **OS** | Darwin 24.6.0 (macOS) |
| **Terminal** | iTerm.app |
| **Copilot Version** | 0.0.400-0 |

## Environment

- **Python**: 3.14.2
- **Node.js**: v22.18.0
- **Git**: 2.50.1
- **GitHub CLI**: 2.83.2

## Task Summary

**Goal**: Create a fortune cookie Azure Function app and deploy it to Azure

**Outcome**: ✅ SUCCESS - Fortune cookie function deployed and operational

---

## Detailed Tool Calls & Responses

### Exchange 1: Start Recording

**User Prompt**: "start recording"

#### Tool Call 1.1: bash

Command: git branch --show-current Result: main Exit Code: 0


### Exchange 2: Create & Deploy Function

**User Prompt**: "Create a fortune cookie function app and deploy to Azure"

#### Tool Call 2.1: bash

Command: func init --worker-runtime python --model V2 Result: Writing function_app.py... Writing requirements.txt... Exit Code: 0


#### Tool Call 2.2: edit

Parameters: { "path": "/path/to/function_app.py" } Action: Added fortune cookie HTTP trigger function Result: File updated successfully


#### Tool Call 2.3: bash (FAILED)

Command: az bicep build --file infra/main.bicep Result: ERROR BCP035: missing required properties: "name" Exit Code: 1


#### Tool Call 2.4: edit (FIX)

Action: Removed unused parameter from monitoring.bicep Result: File updated


#### Tool Call 2.5: bash

Command: azd up --no-prompt Result: Deployed to https://func-xxx.azurewebsites.net Exit Code: 0


---

## Files Created

| File | Purpose | Size |
|------|---------|------|
| `function_app.py` | Fortune cookie HTTP function | ~1.2 KB |
| `azure.yaml` | azd configuration | 135 B |
| `infra/main.bicep` | Main deployment template | 2.3 KB |

## Resources Deployed

| Resource Type | Name | Region |
|--------------|------|--------|
| Resource Group | rg-dev | eastus2 |
| Function App | func-xxx | eastus2 |

## Errors & Fixes

| Error | Location | Fix Applied |
|-------|----------|-------------|
| BCP035: missing "name" | monitoring.bicep | Removed unused parameter |

## Statistics

| Metric | Value |
|--------|-------|
| Total Tool Calls | 35 |
| bash commands | 18 |
| file creates | 7 |
| file edits | 3 |
| Errors encountered | 2 |
| Errors fixed | 2 |

---

_Generated by Copilot CLI Session Recorder_

Security

The recorder automatically scrubs sensitive data before saving:

  • API keys and secrets
  • Bearer tokens
  • GitHub Personal Access Tokens
  • OpenAI keys
  • Azure subscription IDs (partial)

Always review the output before sharing externally.

Commands Quick Reference

Both explicit commands and natural language work. Use explicit commands if natural language isn't giving good results.

Command Natural Language What Happens
/cli-session-recorder start "record this", "start recording" Begin capturing
/cli-session-recorder stop "stop recording" Stop and generate summary
/cli-session-recorder save "save feedback" Save to local file
/cli-session-recorder save --gist "share as gist" Upload to GitHub Gist
/cli-session-recorder save --issue "create issue", "report this" Create GitHub Issue
/cli-session-recorder status "show recording status" Check if recording is active

File Structure

cli-session-recorder/
├── SKILL.md                   # Skill instructions for Copilot
└── resources/
    ├── session_recorder.py    # Core recording logic
    ├── format_feedback.py     # Output generation
    ├── share_gist.py          # GitHub Gist integration
    ├── share_issue.py         # GitHub Issue integration
    └── feedback_format.md     # Output format specification

Requirements

License

Apache 2.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages