Skip to content
Back to skills

Collection

ASecurity

Extract, review, and replace lines in JSONL dataset files for hand-crafted quality improvements. Use when improving synthetic training data, fixing thinking blocks, or manually editing dataset examples.

  • 24 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 8, 2026
businessgobash

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add mattnigh/skills_collection --skill collection --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Collection?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Collection
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mattnigh-collection-09addea9/badge)](https://www.skillsdirectory.com/skills/mattnigh-collection-09addea9)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: dataset-improvement
description: Extract, review, and replace lines in JSONL dataset files for hand-crafted quality improvements. Use when improving synthetic training data, fixing thinking blocks, or manually editing dataset examples.
allowed-tools: Read, Bash, Write
---

# Dataset Improvement Skill

Manually improve quality of thinking blocks in synthetic training dataset JSONL files through systematic extraction and replacement.

## Instructions

This Skill provides bash scripts to:
1. Extract specific lines from JSONL files for manual review
2. Replace lines with hand-crafted improvements
3. Manage backups automatically

### Workflow

1. **Extract lines for review:**
   ```bash
   cd .claude/skills/synethetic-data-generation
   ./scripts/improve_dataset.sh <file> <start_line> [count]
   ```

2. **Review extracted examples** - Identify quality issues:
   - Requirements duplicating plan?
   - Weak or generic memory?
   - Incorrect confidence calibration?
   - Missing contextual details?

3. **Hand-craft improvements** following quality guidelines (see below)

4. **Replace line with improved version:**
   ```bash
   ./scripts/replace_lines.sh <file> <line_num> '<improved_json_content>'
   ```

5. **Repeat** for additional lines in batch

### Quality Guidelines

**Goal:** Make specific and actionable
- ❌ "Update content"
- ✅ "Append 'New entry' to Content/log.md to maintain chronological record"

**Memory:** Add rich context (WHY, WHAT BEFORE, broader situation)
- ❌ "User updating content"
- ✅ "User maintaining activity log for Content Hub. Previously added 8 entries this week tracking blog post drafts and milestones. Log serves as project timeline for content team."

**Requirements:** Verification checks (DISTINCT from plan)
- Must focus on what to CHECK before acting
- Example: `["Verify file exists", "Confirm write permissions", "Check file isn't locked"]`

**Plan:** Execution steps (DISTINCT from requirements)
- Must focus on what to DO
- Example: `["Verify file exists", "Execute append", "Confirm success", "Report to user"]`

**Confidence:** Risk-calibrated scoring
- 0.3-0.5: Risky (delete, replace, overwrite)
- 0.6-0.8: Moderate (update, batch operations)
- 0.85-0.95: Safe (read, list, search, append)

## Examples

### Example 1: Extract 5 lines from contentManager dataset

```bash
./scripts/improve_dataset.sh ../../Datasets/tools_datasets/thinking/contentManager/tools_v1.5.jsonl 100 5
```

Output shows lines 100-104 for review.

### Example 2: Replace line 100 with improved version

```bash
./scripts/replace_lines.sh ../../Datasets/tools_datasets/thinking/contentManager/tools_v1.5.jsonl 100 '{"conversations":[...]}'
```

Creates backup at `tools_v1.5.jsonl.backup` and replaces line 100.

### Example 3: Process dataset in batches

```bash
# Extract batch of 10
./scripts/improve_dataset.sh dataset.jsonl 1 10

# Review and improve each line manually

# Replace each improved line
./scripts/replace_lines.sh dataset.jsonl 1 '<improved_line_1>'
./scripts/replace_lines.sh dataset.jsonl 2 '<improved_line_2>'
# ... continue for all 10

# Move to next batch
./scripts/improve_dataset.sh dataset.jsonl 11 10
```

## Best Practices

1. **Work in small batches** - Process 10-20 examples at a time
2. **Track progress** - Keep notes on which lines completed
3. **Validate JSON** - Use `jq` to verify syntax: `echo '<json>' | jq`
4. **Review backups** - Check `.backup` files before continuing
5. **Use line numbers** - Files use 1-indexed line numbers

## Safety Features

- Automatic `.backup` files created before replacement
- Line-by-line processing prevents bulk errors
- Manual review required at each step
- JSON validation recommended before replacement

## Related Tools

- `jq` - Parse and validate JSON
- `diff` - Compare original vs improved
- `wc -l` - Count total lines in dataset
- `sed -n 'Np'` - Preview single line N

Files in this skill

  • 0Chan-smc__claude-code-workflow-lab__claude__skills__frontend-dev-guidelines__SKILL.md15.1 KB
  • 17hz__nextjs-template__claude__skills__example-skill__SKILL.md316 B
  • 1ambda__dataops-platform__claude__skills__context-synthesis__SKILL.md3.5 KB
  • 1natsu172__dotfiles__claude__skills__git-analysis__SKILL.md5.4 KB
  • 1natsu172__dotfiles__claude__skills__github-pr-best-practices__SKILL.md7.7 KB
  • 23Maestro__prospect-pipeline__claude__skills__npid-fastapi-skill.md26.1 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-code-javascript__SKILL.md15.7 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-code-python__SKILL.md17.5 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-expression-syntax__SKILL.md9.4 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-mcp-tools-expert__SKILL.md12.5 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-node-configuration__SKILL.md16.6 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-workflow-patterns__SKILL.md11.2 KB
  • 3x-Projetos__claude-memory-framework__claude__skills__scientist__SKILL.md14.8 KB
  • 5MinFutures__futures-arena__claude__skills__migration-tracker__SKILL.md16.2 KB
  • 5MinFutures__futures-arena__claude__skills__planning-guidelines__SKILL.md11.8 KB
  • 92Bilal26__TaskPilotAI__claude__skills__assessment-builder__SKILL.md17.5 KB
  • 92Bilal26__TaskPilotAI__claude__skills__book-scaffolding__SKILL.md19.1 KB
  • 92Bilal26__TaskPilotAI__claude__skills__code-validation-sandbox__SKILL.md6.2 KB
  • 92Bilal26__TaskPilotAI__claude__skills__exercise-designer__SKILL.md18.1 KB
  • 92Bilal26__TaskPilotAI__claude__skills__learning-objectives__SKILL.md24.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…