Skip to content
Back to skills

003 Fragile 848a5e79

ASecurity

For fragile operations, create validation scripts that catch errors early.

  • 4 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 31, 2026
code-qualitypythonbashdebuggingdatabasesecurityperformance

Security analysis

A100/100

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

Scanned May 31, 2026

npx -y skills add tools-only/X-Skills --skill 003-fragile_848a5e79 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 003 Fragile 848a5e79?

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

Security grade badge for 003 Fragile 848a5e79
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-003-fragile-848a5e79/badge)](https://www.skillsdirectory.com/skills/tools-only-003-fragile-848a5e79)

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
# Advanced Workflow Patterns

## Validation Scripts and Error Handling

For fragile operations, create validation scripts that catch errors early.

### Example: PDF Form Filling with Validation

````markdown
## PDF form filling workflow

1. Extract form structure: `python scripts/extract_fields.py input.pdf fields.json`
2. **Validate field mappings**: `python scripts/validate_boxes.py fields.json`
   - Returns: "OK" or lists conflicts
3. Apply values: `python scripts/fill_form.py input.pdf fields.json output.pdf`
````

### Why Validation Scripts Work

- Machine-verifiable checks
- Specific error messages: "Field 'signature_date' not found. Available fields: customer_name, order_total, signature_date_signed"
- Early error detection before destructive changes
- Clear debugging paths

### Script Best Practices

- Make scripts solve problems rather than punt to Claude
- Include explicit, helpful error handling
- Avoid "voodoo constants" - justify all hardcoded values
- Document what each script does and when to use it

## Create Verifiable Intermediate Outputs

The "plan-validate-execute" pattern catches errors early by having Claude create a plan in structured format, validate with a script, then execute.

### Problem Example

User asks Claude to update 50 form fields in a PDF based on a spreadsheet. Without validation, Claude might:
- Reference non-existent fields
- Create conflicting values
- Miss required fields
- Apply updates incorrectly

### Solution: Plan-Validate-Execute

Workflow becomes: analyze → **create plan file** → **validate plan** → execute → verify

Add intermediate `changes.json` file validated before applying changes.

### Why This Pattern Works

- **Catches errors early**: Validation finds problems before changes applied
- **Machine-verifiable**: Scripts provide objective verification
- **Reversible planning**: Claude can iterate on plan without touching originals
- **Clear debugging**: Error messages point to specific problems

### When to Use

Batch operations, destructive changes, complex validation rules, high-stakes operations.

## Use Visual Analysis

When inputs can be rendered as images, have Claude analyze them:

````markdown
## Form layout analysis

1. Convert PDF to images:
   ```bash
   python scripts/pdf_to_images.py form.pdf
   ```

2. Analyze each page image to identify form fields
3. Claude can see field locations and types visually
````

Claude's vision capabilities help understand layouts and structures difficult to describe programmatically.

## Workflow Pattern Examples

### Sequential Workflow (Low Ambiguity)

```markdown
## Deploy application

1. Run tests: `npm test`
2. Build production: `npm run build`
3. Deploy: `python scripts/deploy.py --environment prod`
4. Verify deployment: Check output for "Deployment successful"
```

### Conditional Workflow (Medium Ambiguity)

```markdown
## Process customer data

1. Validate input format
2. If CSV format:
   - Use pandas for processing
3. If JSON format:
   - Use json module for processing
4. Transform according to schema in `references/schema.md`
5. Output to database
```

### Open-Ended Workflow (High Ambiguity)

```markdown
## Analyze codebase

1. Identify the primary language and frameworks
2. Review architecture and organization
3. Check for common issues:
   - Security vulnerabilities
   - Performance bottlenecks
   - Code quality concerns
4. Generate report with findings and recommendations
```

## XML Tags for Structure

Claude was trained with XML tags in training data. Use them to structure complex skills:

```markdown
<workflow>
1. <step>Validate input</step>
2. <step>Process data</step>
3. <step>Generate output</step>
</workflow>

<examples>
<example type="simple">...</example>
<example type="complex">...</example>
</examples>
```

Especially useful for:
- Complex multi-step workflows
- Organizing multiple examples
- Structuring reference material
- Separating instructions from metadata

Files in this skill

  • README.md890 B
  • skill.md3.9 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…