Skip to content
Back to skills

Self Configure

ASecurity

Manage moca's own configuration and installation when the user asks to change settings, modes, permission rules, models, prompts or skills — or to update the binary. Config edits need the user's approval; auth.json and the running binary are off-limits.

  • 8 stars
  • 0 votes
  • 0 copies
  • 7 views
  • Added October 25, 2026
ai-agentsrustshellapi

Works with

  • api
  • mcp

Security analysis

A100/100

Scanned November 14, 2026

npx -y skills add adeotek/moca --skill self-configure --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Self Configure?

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

Security grade badge for Self Configure
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/adeotek-self-configure/badge)](https://www.skillsdirectory.com/skills/adeotek-self-configure)

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
---
name: self-configure
description: Manage moca's own configuration and installation when the user asks to change settings, modes, permission rules, models, prompts or skills — or to update the binary. Config edits need the user's approval; auth.json and the running binary are off-limits.
---
<!-- built into moca: this copy follows the binary and an edit here does not survive an update. `moca skills fork self-configure` copies it into your own skills dir, where the copy shadows it. -->

Changing how this moca installation behaves, at the user's request.

## What you can change
- **User config** — the live `config.jsonc` (the environment's moca-dirs line names its directory). Read it, then edit it with `edit`/`write`: it is outside the workdir, so moca raises the approval prompt every time — that is expected. If the user denies the write, stop and ask what they want.
- **Project config** — `<workdir>/.moca/config.jsonc`: `permissions` (allow/ask/deny rules, defaultMode), `mcp` (project servers and approvals) and `skills` (the opt-out switches). It lives inside the workdir and takes effect only when the project is trusted.
- **Prompt templates** — `<prompts dir>/<name>.md`, one file per `/name` command (frontmatter `description`, optional `argument-hint`; body placeholders `$ARGUMENTS`/`$@` for all arguments as typed, `$1..$9` per argument, `${1}`/`${@:N:L}` and the other brace forms, `$$` for a literal `$` — §12 of the reference has the full set). Writes there raise the approval prompt.
- **Skills** — `<skills dir>/<name>/SKILL.md` with frontmatter `name` and `description` (optional `argument-hint`); supporting files live beside it. Writes there raise the approval prompt.
- **The session's permission mode** — suggest the user type `/mode default|auto|yolo|plan` (or shift+tab); never change it yourself.

## How
- `read` the file first — `edit` requires it. Use exact replacements: JSONC comments must survive the edit.
- The config decode is strict: unknown keys are rejected; `apiKey` must be an `env:VAR` reference, never a literal; `permissions.defaultMode` is `default|auto|plan|yolo` (`plan` starts the plan scope); a project's `.moca/config.jsonc` may hold only `permissions` (startup mode `default|auto|plan`, never `yolo`), `mcp` and `skills` (`selfManaged: false` opts the repo out, `recordNudge: false` silences the end-of-run nudge, and a project `true` never enables self-managed skills) — `tui` (theme, notify) is user-config only.

## Verify
- Re-read the file after writing.
- Then run `moca config check` via shell: it validates the user config, the `.env` beside it and the trusted project file, lists every issue and exits 2 if there is one (`moca config sample` prints a complete commented config).

## Never
- `auth.json` (in the same directory as the config): credentials belong to `/login` or `moca login <provider>` — the user types those. Never ask for, read, write or echo keys.
- The data dir (sessions, trust.json, snapshots) and the running binary.

## Installation
- `moca update --check` reports whether a newer release exists (safe, read-only). The user runs `moca update` themselves to install it. Install/uninstall paths are in the readme reference.
- `moca prune --dry-run` lists the older built-in skill extractions that previous versions left in the data dir (safe, read-only). The user runs `moca prune` themselves to delete them, when no older moca is open; it never touches sessions, config or your skills.

## When it takes effect
- A new prompt or skill is usable as soon as this run ends (`/` picker reloads; `/help` lists them) — no restart.
- A system-prompt listing refresh needs a new session; config changes apply to the next launch.

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

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