---
name: dem0n-auhor
description: Validate, package, and publish Codex or Claude skill folders to DEM0NHUB through the DEM0NHUB API. Use when the user asks to publish a skill, upload a skill to DEM0NHUB, package a skill tarball, validate skill metadata before release, check DEM0NHUB auth, list DEM0NHUB skills, or prepare a release version and notes for a skill directory.
---


# dem0n auhor

## Overview

Use this skill to release skill folders to DEM0NHUB without hand-writing tar/curl commands. It validates the skill shape, builds a clean `tar.gz` with `SKILL.md` at archive root, and posts it to the DEM0NHUB API.

## Quick Start

Prefer the bundled script:

```bash
export DEM0NHUB_TOKEN="dmn_xxxxxxxxxxxxxxxxx"
python3 "$HOME/.codex/skills/dem0n-auhor/scripts/dem0n_auhor.py" publish \
  "$HOME/.codex/skills/my-skill" \
  --version auto \
  --notes "first release"
```

Run a release check without network or token:

```bash
python3 "$HOME/.codex/skills/dem0n-auhor/scripts/dem0n_auhor.py" publish \
  "$HOME/.codex/skills/my-skill" \
  --dry-run
```

## Workflow

1. Confirm the target folder is a skill directory with `SKILL.md` at root.
2. If the skill was just created, ensure `agents/openai.yaml` exists and no generated template placeholders remain.
3. Run `doctor` first for a metadata-only check when publishing may be risky.
4. Run `publish --dry-run` to validate and build an archive without using the API.
5. Run `publish` with `DEM0NHUB_TOKEN` or `--token-file` when the user is ready.
6. Report the DEM0NHUB response URL or JSON summary. Never print tokens.

## Commands

Validate a skill:

```bash
python3 "$HOME/.codex/skills/dem0n-auhor/scripts/dem0n_auhor.py" doctor \
  "$HOME/.codex/skills/my-skill"
```

Build a clean archive:

```bash
python3 "$HOME/.codex/skills/dem0n-auhor/scripts/dem0n_auhor.py" pack \
  "$HOME/.codex/skills/my-skill" \
  --out "$PWD/my-skill.tar.gz"
```

Publish:

```bash
python3 "$HOME/.codex/skills/dem0n-auhor/scripts/dem0n_auhor.py" publish \
  "$HOME/.codex/skills/my-skill" \
  --version 0.1.0 \
  --notes "initial DEM0NHUB release"
```

Check auth:

```bash
python3 "$HOME/.codex/skills/dem0n-auhor/scripts/dem0n_auhor.py" whoami
```

List/search published skills:

```bash
python3 "$HOME/.codex/skills/dem0n-auhor/scripts/dem0n_auhor.py" list --query gif
```

## Token Handling

Use this priority order:

1. `--token`
2. `DEM0NHUB_TOKEN`
3. `DMN_TOKEN`
4. `--token-file`
5. `~/.config/dem0nhub/token`
6. `~/.dem0nhub/token`
7. `~/.dem0nhub-token`

Prefer environment variables or token files. Do not echo tokens, add them to skill files, commit them, or paste them into chat logs.

## Notes

- `--version auto` generates a DEM0NHUB-style timestamp version such as `0.0.1776993385973`.
- The packer excludes common junk paths such as `.git`, `node_modules`, virtualenvs, caches, `.DS_Store`, and generated archives.
- Symlinks are skipped to avoid accidentally packaging files outside the skill directory.
- Read `references/dem0nhub-api.md` only when API endpoint details are needed.
