Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Mercury Agent Cosmicstack

DSecurity

> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection. Mercury is a soul-driven AI agent that runs 24/7 from CLI or Telegram. It features 21 built-in tools, permission-hardened execution (asks before it acts), token budget enforcement, extensible skills, and daemon mode with system service integration. ---

81 stars
0 votes
0 copies
0 views
Added 9/19/2026
ai-agentstypescriptgoshellbashnodegitapidatabase

Works with

terminalcliapi

Security Analysis

D52/100
highPerforms destructive filesystem operations
criticalModifies startup scripts or system services for persistence
mediumInstalls packages at runtime which could introduce malicious dependencies

Scanned 9/19/2026

Install to Claude Code

$npx -y skills add reason-machines/trending-skills --skill mercury-agent-cosmicstack --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mercury Agent Cosmicstack?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Mercury Agent Cosmicstack
[![Security: D — Skills Directory](https://www.skillsdirectory.com/api/skills/reason-machines-mercury-agent-cosmicstack/badge)](https://www.skillsdirectory.com/skills/reason-machines-mercury-agent-cosmicstack)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
```markdown
---
name: mercury-agent-cosmicstack
description: Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel CLI/Telegram access
triggers:
  - set up mercury agent
  - run mercury ai agent
  - configure mercury telegram bot
  - add mercury agent to my project
  - mercury agent daemon mode
  - schedule tasks with mercury agent
  - extend mercury agent with skills
  - mercury agent token budget
---

# Mercury Agent

> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.

Mercury is a soul-driven AI agent that runs 24/7 from CLI or Telegram. It features 21 built-in tools, permission-hardened execution (asks before it acts), token budget enforcement, extensible skills, and daemon mode with system service integration.

---

## Installation

```bash
# One-shot via npx (no install required)
npx @cosmicstack/mercury-agent

# Global install
npm i -g @cosmicstack/mercury-agent
mercury
```

First run launches the setup wizard — enter your name, LLM API key, and optionally a Telegram bot token. Takes ~30 seconds.

---

## Key CLI Commands

```bash
# === Lifecycle ===
mercury up              # Recommended: install service + start daemon + ensure running
mercury                 # Start in foreground (same as mercury start)
mercury start           # Start in foreground
mercury start -d        # Start in background (daemon mode)
mercury restart         # Restart background process
mercury stop            # Stop background process

# === Diagnostics ===
mercury logs            # View recent daemon logs
mercury status          # Show config and daemon status
mercury doctor          # Reconfigure (Enter to keep current values)
mercury setup           # Re-run setup wizard
mercury help            # Show full manual
mercury --verbose       # Start with debug logging

# === System Service (auto-start on boot) ===
mercury service install    # Install as system service
mercury service uninstall  # Remove system service
mercury service status     # Check service status
```

---

## Configuration

All runtime data lives in `~/.mercury/` — never inside your project directory.

| Path | Purpose |
|------|---------|
| `~/.mercury/mercury.yaml` | Main config (providers, channels, budget) |
| `~/.mercury/soul/*.md` | Agent personality files |
| `~/.mercury/permissions.yaml` | Tool capabilities and approval rules |
| `~/.mercury/skills/` | Installed community skills |
| `~/.mercury/schedules.yaml` | Scheduled tasks (persisted across restarts) |
| `~/.mercury/token-usage.json` | Daily token tracking |
| `~/.mercury/memory/` | Short-term, long-term, episodic memory |
| `~/.mercury/daemon.pid` | Background process PID |
| `~/.mercury/daemon.log` | Daemon logs |

### Example `mercury.yaml`

```yaml
providers:
  - name: deepseek
    apiKey: $DEEPSEEK_API_KEY
    model: deepseek-chat
  - name: openai
    apiKey: $OPENAI_API_KEY
    model: gpt-4o-mini
  - name: anthropic
    apiKey: $ANTHROPIC_API_KEY
    model: claude-3-haiku-20240307

channels:
  telegram:
    token: $TELEGRAM_BOT_TOKEN

budget:
  dailyTokens: 100000
  conciseThreshold: 0.7  # Switch to concise mode at 70% usage

agent:
  name: Mercury
  soulDir: ~/.mercury/soul
```

### Example `permissions.yaml`

```yaml
filesystem:
  readPaths:
    - ~/projects
    - ~/Documents
  writePaths:
    - ~/projects
  requireApproval: false

shell:
  enabled: true
  requireApproval: true       # Always ask before running shell commands
  blocklist:
    - "sudo"
    - "rm -rf /"
    - "dd if="
    - "mkfs"

web:
  fetchEnabled: true
  requireApproval: false
```

---

## In-Chat Commands

These work in both CLI and Telegram without consuming API tokens:

```
/help                   Show the full manual
/status                 Show agent config, budget, and usage
/tools                  List all loaded tools
/skills                 List installed skills
/stream                 Toggle Telegram text streaming
/stream off             Disable streaming (single message delivery)
/budget                 Show token budget status
/budget override        Override budget limit for one request
/budget reset           Reset usage counter to zero
/budget set 50000       Change daily token budget to 50,000 tokens
```

---

## Built-in Tools Reference

| Category | Tool Names |
|----------|-----------|
| **Filesystem** | `read_file`, `write_file`, `create_file`, `edit_file`, `list_dir`, `delete_file`, `send_file` |
| **Shell** | `run_command`, `approve_command` |
| **Git** | `git_status`, `git_diff`, `git_log`, `git_add`, `git_commit`, `git_push` |
| **Web** | `fetch_url` |
| **Skills** | `install_skill`, `list_skills`, `use_skill` |
| **Scheduler** | `schedule_task`, `list_scheduled_tasks`, `cancel_scheduled_task` |
| **System** | `budget_status` |

---

## Soul / Personality Files

Mercury's personality is defined by markdown files you own:

```bash
~/.mercury/soul/
  soul.md        # Core identity and values
  persona.md     # How Mercury presents itself
  taste.md       # Aesthetic preferences, communication style
  heartbeat.md   # Proactive behavior and background monitoring rules
```

### Example `soul.md`

```markdown
# Soul

You are Mercury — a precise, thoughtful assistant who values clarity over verbosity.
You ask before acting on anything that could have side effects.
You prefer surgical edits over rewrites.
You treat the user's time as precious.
```

### Example `heartbeat.md`

```markdown
# Heartbeat

Every hour, check:
- Are there any failing CI pipelines in ~/projects?
- Are there unread Telegram messages that need follow-up?

Notify proactively only if something requires attention.
```

---

## Skill System

Mercury uses the [Agent Skills](https://agentskills.io) specification.

```bash
# Install a community skill (ask Mercury directly)
# In chat: "install the github-summary skill"
# Mercury calls: install_skill({ name: "github-summary" })

# List installed skills
# In chat: "/skills"

# Use a skill
# In chat: "use the github-summary skill on cosmicstack-labs/mercury-agent"
```

### Writing a Custom Skill

Skills are SKILL.md files with YAML frontmatter:

```markdown
---
name: daily-standup
description: Generate a daily standup report from git activity
version: 1.0.0
allowed-tools:
  - git_log
  - git_diff
  - run_command
triggers:
  - generate standup
  - what did I do today
  - daily report
---

# Daily Standup Skill

Fetch today's git commits across all repos in ~/projects and format
a standup report: what was done, what's in progress, any blockers.

Steps:
1. `list_dir` on ~/projects to find repos
2. `git_log --since=yesterday --author=$(git config user.email)` per repo
3. Summarize changes grouped by repo
4. Output in standup format: Done / Doing / Blockers
```

---

## Scheduler (Cron + One-Shot)

```
# In chat — schedule a recurring task:
"Every day at 9am, summarize my GitHub notifications"
# Mercury calls: schedule_task({ cron: "0 9 * * *", task: "..." })

# One-shot delayed task:
"In 15 minutes, remind me to review the PR"
# Mercury calls: schedule_task({ delay_seconds: 900, task: "..." })

# List scheduled tasks:
/tools → then ask "what tasks are scheduled?"
# Or: schedule_task → list_scheduled_tasks

# Cancel a task:
"Cancel the daily standup task"
# Mercury calls: cancel_scheduled_task({ id: "..." })
```

Tasks persist in `~/.mercury/schedules.yaml` and survive restarts. Responses route back to the channel where the task was created.

---

## Provider Fallback Pattern

Mercury tries providers in order and falls back automatically on failure:

```yaml
# mercury.yaml — order matters, first = primary
providers:
  - name: deepseek       # Primary: cost-effective
    apiKey: $DEEPSEEK_API_KEY
    model: deepseek-chat
  - name: openai         # Fallback 1
    apiKey: $OPENAI_API_KEY
    model: gpt-4o-mini
  - name: anthropic      # Fallback 2
    apiKey: $ANTHROPIC_API_KEY
    model: claude-3-haiku-20240307
```

Set environment variables before starting:

```bash
export DEEPSEEK_API_KEY=your_key_here
export OPENAI_API_KEY=your_key_here
export ANTHROPIC_API_KEY=your_key_here
export TELEGRAM_BOT_TOKEN=your_token_here

mercury up
```

---

## Telegram Setup

1. Create a bot via [@BotFather](https://t.me/BotFather) → copy token
2. Run `mercury doctor` and paste the token when prompted
3. Run `mercury up` to start daemon
4. Open your bot in Telegram and start chatting

Telegram features: HTML formatting, file uploads (photos, audio, video, documents), typing indicators, streaming toggle, all `/` commands.

---

## Daemon Mode & System Services

```bash
# Start persistent daemon (installs service on first run)
mercury up

# Platform-specific service locations:
# macOS:   ~/Library/LaunchAgents/org.cosmicstack.mercury.plist
# Linux:   ~/.config/systemd/user/mercury.service
# Windows: Task Scheduler entry "MercuryAgent"

# Check what's running
mercury status

# View live logs
mercury logs

# Crash recovery is automatic:
# - Watchdog detects crash → restarts with exponential backoff
# - Max 10 restarts/minute before cooldown
```

In daemon mode, Telegram is the primary interaction channel. CLI becomes log-only (no terminal input).

---

## Architecture Notes

- **TypeScript + Node.js 20+** — ESM modules, built with tsup, zero native dependencies
- **Vercel AI SDK v4** — `generateText` + `streamText`, 10-step agentic loop
- **grammY** — Telegram bot framework
- **Flat-file persistence** — No database; YAML + JSON in `~/.mercury/`
- **Daemon manager** — Background spawn + PID file + watchdog

---

## Common Patterns

### Pattern: Scoped file access for a project

```yaml
# permissions.yaml
filesystem:
  readPaths:
    - ~/projects/my-app
  writePaths:
    - ~/projects/my-app/src
  requireApproval: false
```

Then in chat: "Refactor all TypeScript files in src/ to use async/await" — Mercury reads freely, writes to `src/`, asks before touching anything outside.

### Pattern: Shell with approval for destructive ops

```yaml
# permissions.yaml
shell:
  enabled: true
  requireApproval: true
  blocklist:
    - "sudo"
    - "rm -rf"
    - "DROP TABLE"
    - "> /dev/sda"
```

Mercury will propose the command and wait for your "yes" before executing.

### Pattern: Daily digest via heartbeat

```markdown
# ~/.mercury/soul/heartbeat.md

Every day at 8am:
- Run `git log --since=yesterday` across ~/projects
- Fetch my top 3 GitHub notifications
- Send a digest to Telegram summarizing overnight activity
```

### Pattern: Override budget for a large task

```
# In chat when over budget:
/budget override
# Then immediately send your large request — budget is bypassed for one turn
```

---

## Troubleshooting

| Problem | Solution |
|---------|----------|
| `mercury: command not found` | Run `npm i -g @cosmicstack/mercury-agent` or use `npx` |
| Agent not responding | `mercury status` → `mercury restart` |
| Wrong API key | `mercury doctor` → update key → Enter to keep others |
| Telegram bot silent | Check token in `mercury.yaml`, ensure `mercury up` is running |
| Over token budget | `/budget reset` or `/budget override` for one request |
| Permission denied on file | Add path to `readPaths`/`writePaths` in `permissions.yaml` |
| Skill not found | Ask Mercury: "install the X skill" — it calls `install_skill` |
| Service not starting on boot | `mercury service install` then check `mercury service status` |
| Daemon crash loop | `mercury logs` to diagnose, fix config, then `mercury up` |
| Provider errors | Check env vars are exported; add fallback provider in `mercury.yaml` |

### Debug mode

```bash
mercury --verbose       # Prints full tool call traces, provider selection, token counts
mercury logs            # View daemon log file (last N lines)
```

### Reset everything

```bash
mercury stop
rm -rf ~/.mercury
mercury setup           # Fresh wizard
```

---

## License

MIT © [Cosmic Stack](https://github.com/cosmicstack-labs)

> **Disclaimer:** This is AI — it can break sometimes. Use at your own risk.
```

Attribution

reason-machinesreason-machines
View sourceMore from reason-machines →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

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 (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Caveman

Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.

1023331 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

686011 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3331 votes

catchup

Recovers prior coding-agent session context by running `catchup <agent> --since-compact`, which extracts a clean summary of a previous Codex, Claude Code, Antigravity, OpenCode, or Pi Agent session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", or asks to recover/summarize a previous session before continuing. Do NOT use for the current conversation, git history, or any non-agent log.

611 votes

math-skill

A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling

381 votes
View all in ai-agents →