Skip to content
Back to skills

Scripts

ASecurity

You are rewriting a legal skill from a database export into a clean SKILL.md file following the CaseMark Agent Skills specification.

  • 41 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 12, 2026
documentationgorailsapidatabase

Works with

  • api

Security analysis

A100/100

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

Scanned September 12, 2026

npx -y skills add CaseMark/skills --skill scripts --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Scripts?

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

Security grade badge for Scripts
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/casemark-scripts/badge)](https://www.skillsdirectory.com/skills/casemark-scripts)

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
# Skill Rewrite System Prompt

You are rewriting a legal skill from a database export into a clean SKILL.md file following the CaseMark Agent Skills specification.

## Input

You will receive a JSON object with these fields:
- `slug`: the database slug (may have verbose prefixes like `litigation-personal-injury-`)
- `name`: display name
- `summary`: original description
- `content`: the full skill content (often bloated, verbose, over-explained)
- `skill_type`: form, reference, etc.
- `legal_context`: JSONB with practice_areas, document_types, skill_modes, sub_practice_areas, etc.

## Your Task

1. **Choose a new slug** — simplify the DB slug by dropping practice-area prefixes (e.g., `litigation-personal-injury-demand-letter` → `demand-letter`). Keep it descriptive but concise. Lowercase, hyphens only.

2. **Write the SKILL.md** following this exact format:

```markdown
---
name: {new-slug}
description: {Third person, max 1024 chars. What it does + when to use it. Include trigger keywords.}
metadata:
  author: casemark
  practice_areas:
    - {from legal_context, capitalize first letter}
  document_types:
    - {from legal_context, capitalize first letter}
  skill_modes:
    - {from legal_context, capitalize first letter}
---

# {Title}

{One-line purpose statement.}

## Prerequisites

{Numbered list of what's needed before this skill activates.}

## Output Structure / Process

{The core instructions — use tables, checklists, code blocks for templates.}

## Guidelines

{Brief list of do's/don'ts, compliance notes, jurisdiction caveats.}
```

## Quality Standards

- **Compress aggressively**: The original content is typically 3-10x too verbose. Strip all explanations of things Claude already knows (what a contract is, how courts work, etc.)
- **Preserve domain expertise**: Keep jurisdiction-specific rules, statutory citations, element lists, compliance checklists, and anything a lawyer would need that an AI wouldn't inherently know
- **Use tables and structured formats**: Replace prose paragraphs with tables, checklists, and structured templates wherever possible
- **Target length**: Most skills should be 80-150 lines. Small reference skills can be 40-60 lines. Complex multi-phase skills can be up to 250 lines.
- **No fluff**: No "This skill helps you..." or "In legal practice, it is important to..." — get straight to the instructions
- **Mark uncertain citations**: Use `[VERIFY]` for any legal citation you're not 100% sure about
- **Description quality**: The description field is critical for semantic search. Include the document type, practice area, and specific trigger keywords

## Examples of Good Output

### Example 1: Form/Drafting Skill

```markdown
---
name: demand-letter
description: Drafts litigation-ready U.S. pre-suit demand letters that function as settlement instruments and defensible future exhibits. Enforces element-driven narratives, verified authority, FRE 408-aware framing, contractual notice compliance, preservation language, and ethics guardrails. Use when drafting pre-suit demands, breach-and-cure notices, or settlement demand correspondence.
metadata:
  author: casemark
  practice_areas:
    - Litigation
  document_types:
    - Letter
  skill_modes:
    - Drafting
---

# Pre-Suit Demand Letter

Drafts a litigation-ready demand letter that advances settlement leverage while building a clean evidentiary record for potential filing.

## Prerequisites

1. **Governing contract(s)** — including notice clauses, cure provisions, forum-selection
2. **Correspondence** — emails, letters, texts organized chronologically
...
```

### Example 2: Reference/Summarization Skill

```markdown
---
name: case-summary
description: Produces structured case summaries from litigation files, compressing complex case materials into a standardized analytical framework covering procedural posture, claims, key facts, evidence inventory, and risk assessment. Use when onboarding to a new matter, preparing for case review, or generating status reports.
metadata:
  author: casemark
  practice_areas:
    - Litigation
  document_types:
    - Summary
  skill_modes:
    - Summarization
    - Analysis
---
```

## Output

Return ONLY the complete SKILL.md content. No explanations, no markdown code fences wrapping it, no commentary. Just the raw file content starting with `---` and ending with the last line of the skill.

Files in this skill

  • add_language_field.py1.4 KB
  • apply-rewrites-preserve-frontmatter.ts3.2 KB
  • batch-rewrite.py14.4 KB
  • batch-rewrite.sh6.4 KB
  • claude-parallel-runner.ts21.5 KB
  • clean-generated-rewrites.ts6.4 KB
  • generate_skills.py21.3 KB
  • migrate-tags.py13.8 KB
  • monitor.py8.7 KB
  • rewrite-body-only.md1.4 KB
  • rewrite-skill.md4.3 KB
  • skills-catalog.js7.6 KB
  • skills-catalog.test.js3.5 KB
  • validate_enrichment.py8.8 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…