# ArtifactGuard for Claude Code

Use ArtifactGuard when a Claude Code task may create, download, extract, copy, or generate temporary artifacts.

## When To Use

Run ArtifactGuard for tasks involving:

- downloaded files
- extracted archives or documents
- generated debug logs
- scratch scripts
- one-off reports
- copied customer/candidate/private files
- any artifact that should not silently remain in the workspace

## Workflow

At the start of the task:

```bash
artifact-guard start
```

During work, optionally inspect changes:

```bash
artifact-guard status
```

Before the final response:

```bash
artifact-guard finish --report
```

If safe cleanup is approved:

```bash
artifact-guard finish --delete-safe --report
```

If the user should review cleanup candidates:

```bash
artifact-guard finish --interactive --report
```

## Safety Rules

ArtifactGuard only auto-deletes files classified as both:

- `temporary`
- `created`

Never auto-delete:

- source changes
- Git-tracked files
- sensitive files
- deliverables
- unknown files
- modified files
- deleted-file records

## Final Response

Include a concise cleanup line:

- `Cleanup: ArtifactGuard deleted safe temporary artifacts and wrote .artifact-guard/report.md.`
- `Cleanup: ArtifactGuard found no temporary artifacts.`
- `Cleanup: ArtifactGuard kept sensitive/unknown artifacts for manual review.`
