Skip to content
Back to skills

189 User C8554bbb

ASecurity

If a user tells you there is a problem with the project, review the `target/run_results.json` file to identify which resources failed and why.

  • 9 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 31, 2026
developmentpythonsql

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 189-user_c8554bbb --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 189 User C8554bbb?

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

Security grade badge for 189 User C8554bbb
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-189-user-c8554bbb/badge)](https://www.skillsdirectory.com/skills/tools-only-189-user-c8554bbb)

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
# Review dbt Run Results

## When to Use

If a user tells you there is a problem with the project, review the `target/run_results.json` file to identify which resources failed and why.

Check the `metadata.generated_at` key to ensure the information is fresh.

## Python Script

```python
import json

def review_dbt_run_results(run_results_path: str):
    """Review dbt run_results.json and identify failures."""
    with open(run_results_path) as f:
        data = json.load(f)
    
    results = data.get('results', [])
    failed = [r for r in results if r.get('status') == 'error']
    
    print(f"Total: {len(results)} | Failed: {len(failed)}")
    
    if failed:
        print("\nFailed Resources:")
        for r in failed:
            # Extract resource name from unique_id (e.g., "model.project.name" -> "name")
            resource_name = r['unique_id'].split('.')[-1]
            resource_type = r['unique_id'].split('.')[0]
            
            print(f"\n- {resource_type}: {resource_name}")
            
            # Parse error message for key details
            message = r.get('message', '')
            if message:
                # Extract the main error line
                error_lines = [line for line in message.split('\n') if line.strip()]
                print(f"  Error: {error_lines[0] if error_lines else message}")
            
            # Show compiled SQL if available
            compiled = r.get('compiled_code', '').strip()
            if compiled and len(compiled) < 200:
                print(f"  SQL: {compiled}")
            elif compiled:
                print(f"  SQL: {compiled[:200]}...")
    
    return failed

# Usage
failed_resources = review_dbt_run_results('target/run_results.json')
```

Files in this skill

  • README.md1 KB
  • skill.md1.7 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…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.