Skill: crimsondevil333333/context-onboarding (version 1.0.1)

--- name: context-onboarding description: Provide new contributors and agents with a concise tour of the workspace identity files (SOUL.md, USER.md, AGENTS.md, TOOLS.md) plus onboarding tips. Use when a newcomer needs context or when you want to double-check how this workspace is configured. --- # Context Onboarding ## When to use this skill - You're guiding someone new through Clawdy/Clawd and want a quick summary of the personality, operating rules, and per-skill notes. - You need to remind yourself of the tone preferences or tooling constraints without reading every document top to bottom. ## What it does - `scripts/context_onboarding.py` reads the key documents (`SOUL.md`, `USER.md`, `AGENTS.md`, `TOOLS.md` by default) and prints the first few lines of each so you can skim character, rules, and tooling notes. - The CLI supports `--files` to include additional documents, `--lines` to control how many lines are shown per file, and `--brief` to emit only the opening sentence of each section. - Use `references/context-guidelines.md` when you need more guidance about what newcomers should read next or how to keep the vibe consistent. ## CLI usage - `python3 skills/context-onboarding/scripts/context_onboarding.py` summarizes the default identity docs and prints the first five lines per file. - Add `--files docs/PLAYBOOK.md docs/ROLE.md` to weave in extra reference material that onboards the newcomer to cadence notes or release rituals. - Pair `--lines 2` with `--brief` to emit single-line headlines when you just need the gist. - `--workspace /path/to/other-workspace` lets you compare multiple workspaces or prepare summaries for a sister repo before pairing. ## Example command ```bash python3 skills/context-onboarding/scripts/context_onboarding.py --files references/context-guidelines.md HEARTBEAT.md --lines 2 ``` This prints the opening two lines for the personality files plus the heartbeat and onboarding guide so you can review vibe, reminders, and cadence expectations without opening every file. ## Options - `--files <path>`: Accepts extra markdown files (comma/space separated) that the script should include in the output order you provide. - `--lines <n>`: Controls how many lines from each file are shown (default 5) so you can tighten or loosen the briefing. - `--brief`: Shrinks each preview to the first sentence (splitting on `.`, `?`, or `!`). Use this for lightning summaries during sync calls. - `--workspace <dir>`: Point the CLI at another workspace root; useful for onboarding clones, reviewing experimental docs, or prepping a new repo. ## References - `references/context-guidelines.md` documents onboarding topics, role expectations, cadence notes, and reminders for how this group runs. ## Resources - **GitHub:** https://github.com/CrimsonDevil333333/context-onboarding - **ClawHub:** https://www.clawhub.ai/skills/context-onboarding

path: README.md
content: # Context Onboarding

Context Onboarding gives you a curated summary of the identity docs that define this workspace: the personality (SOUL.md), the user guidance (USER.md), agent rules (AGENTS.md), and tooling notes (TOOLS.md). It is the perfect skill to run when someone joins the community, when you inherit a new workspace, or when you just want a refresher on how to stay in sync.

## Features

- CLI script at `skills/context-onboarding/scripts/context_onboarding.py` that reads the most relevant markdown files and prints the first few lines from each so you can skim key points instantly.
- Optional `--files` flag to include extra docs (e.g., playbooks or onboarding guides) plus `--lines`/`--brief` knobs for longer or shorter outputs.
- Built-in reference guide (`references/context-guidelines.md`) that explains what to highlight during onboarding calls or documentation drops.

## Usage

```bash
python3 skills/context-onboarding/scripts/context_onboarding.py --lines 4
```

Add `--files docs/PLAYBOOK.md` if you want to weave in other material, or `--brief` to limit the output to one sentence per doc.

## Testing

```bash
python3 -m unittest discover skills/context-onboarding/tests
```

## Packaging & release

```bash
python3 $(npm root -g)/openclaw/skills/skill-creator/scripts/package_skill.py skills/context-onboarding
```

## Links

- **GitHub:** https://github.com/CrimsonDevil333333/context-onboarding
- **ClawHub:** https://www.clawhub.ai/skills/context-onboarding


path: references/context-guidelines.md
content: # Context Onboarding Guidelines

When you onboard someone into this workspace, keep the conversation focused on:

1. **Personality & tone** – Clawdy is casual, friendly, and curious. Reference `SOUL.md` for words like “chill but precise.”
2. **Roles & permissions** – Do not presume you can change the system prompts or drop into privileged nodes unless explicitly asked. `AGENTS.md` spells out each persona.
3. **Tools & workflows** – Highlight `TOOLS.md` so new teammates know which CLIs (e.g., `openclaw`, `gh`, `moltbook`) are approved and where to route requests.
4. **Memory habits** – Mention the importance of logging thoughts into `memory/YYYY-MM-DD.md` and syncing via Memory Keeper before risky actions.
5. **Community expectations** – Share any ongoing rituals or heartbeat checks located in `HEARTBEAT.md`.


path: scripts/context_onboarding.py
content: #!/usr/bin/env python3
"""Generate a quick digest of the key workspace identity documents."""
from __future__ import annotations

import argparse
from pathlib import Path
import textwrap

DEFAULT_FILES = ["SOUL.md", "USER.md", "AGENTS.md", "TOOLS.md"]


def load_snippet(path: Path, lines: int, brief: bool) -> str:
    text = path.read_text(encoding="utf-8").strip().splitlines()
    cleaned = [line.strip() for line in text if line.strip()]
    if not cleaned:
        return "(empty document)"
    if brief:
        return cleaned[0]
    snippet = cleaned[:lines]
    return "\n".join(snippet)


def summarize_files(workspace: Path, files: list[str], lines: int, brief: bool) -> None:
    workspace = workspace.expanduser().resolve()
    for name in files:
        path = workspace / name
        print(f"--- {name} ---")
        if not path.exists():
            print("File not found in this workspace.\n")
            continue
        snippet = load_snippet(path, lines, brief)
        print(textwrap.indent(snippet, "  "))
        print()


def main() -> int:
    parser = argparse.ArgumentParser(
        description="Context onboarding glimpses the key workspace documents for quick orientation."
    )
    parser.add_argument(
        "--workspace",
        default=".",
        help="Workspace root containing SOUL.md, USER.md, etc.",
    )
    parser.add_argument(
        "--files",
        nargs="+",
        default=DEFAULT_FILES,
        help="List of files to summarize (defaults to the core identity docs).",
    )
    parser.add_argument(
        "--lines",
        type=int,
        default=3,
        help="How many non-empty lines to show per document.",
    )
    parser.add_argument(
        "--brief",
        action="store_true",
        help="Show only the first meaningful line from each file.",
    )

    args = parser.parse_args()
    summarize_files(Path(args.workspace), args.files, args.lines, args.brief)
    return 0


if __name__ == "__main__":
    raise SystemExit(main())


path: tests/test_context_onboarding.py
content: import subprocess
import sys
import tempfile
from pathlib import Path
import unittest

SCRIPT_PATH = Path(__file__).resolve().parents[1] / "scripts" / "context_onboarding.py"


def run_workspace(args, workspace):
    return subprocess.run(
        [sys.executable, str(SCRIPT_PATH)] + args,
        capture_output=True,
        text=True,
        cwd=workspace,
    )


class ContextOnboardingTests(unittest.TestCase):
    def test_summaries_default_documents(self):
        with tempfile.TemporaryDirectory() as tmpdir:
            workspace = Path(tmpdir)
            (workspace / "SOUL.md").write_text("Clawdy is friendly.", encoding="utf-8")
            (workspace / "USER.md").write_text("User prefers short answers.", encoding="utf-8")
            (workspace / "AGENTS.md").write_text("Agent rules: stay calm.", encoding="utf-8")
            (workspace / "TOOLS.md").write_text("Tools: git, clawhub.", encoding="utf-8")

            result = run_workspace([], workspace)
            self.assertEqual(result.returncode, 0)
            self.assertIn("SOUL.md", result.stdout)
            self.assertIn("Clawdy is friendly.", result.stdout)
            self.assertIn("TOOLS.md", result.stdout)

    def test_brief_flag_limits_to_one_line(self):
        with tempfile.TemporaryDirectory() as tmpdir:
            workspace = Path(tmpdir)
            (workspace / "SOUL.md").write_text("Clawdy is friendly.\nSecond line.", encoding="utf-8")

            result = run_workspace(["--brief"], workspace)
            self.assertEqual(result.returncode, 0)
            self.assertIn("Clawdy is friendly.", result.stdout)
            self.assertNotIn("Second line", result.stdout)


if __name__ == "__main__":
    unittest.main()


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: suspicious | SkillSpector: suspicious (MEDIUM)