# How to Initiate the Case Management Process in reverse-skill: The case-init Command Explained

> Learn how to initiate the case management process in reverse-skill using the case-init command. Create your workspace, scope file, and timeline entry with this essential script.

- Repository: [ZhaoXu/reverse-skill](https://github.com/zhaoxuya520/reverse-skill)
- Tags: how-to-guide
- Published: 2026-08-23

---

**Run the `case-init` script (`case-init.ps1` on Windows or [`case-init.sh`](https://github.com/zhaoxuya520/reverse-skill/blob/main/case-init.sh) on Linux/macOS) to create the case workspace, generate the mandatory [`scope.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/scope.md) file, and register the initial timeline entry.**

The **case management process** in the reverse-skill repository begins with a single authoritative command that establishes the project structure and security boundaries required for all subsequent analysis. This initiation step is the mandatory entry point for every reverse-engineering or penetration-testing workflow, ensuring that authentication status, network profiles, and scope constraints are documented before any ACT (Action) commands execute.

## What Is the case-init Command?

The **`case-init`** command is the bootstrap mechanism for the reverse-skill framework. Located in `skills/scripts/`, this script creates a dedicated case directory under `work/<case>/` and populates it with the canonical metadata files required by downstream tools. According to [`skills/MASTER-ROUTING.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/MASTER-ROUTING.md), this step sits precisely at position three in the workflow chain: *routing → case-init → scope → guard → primary skill*.

Executing this command is non-optional. All subsequent operations—including evidence collection, routing decisions, and ACT execution—depend on the artefacts produced during this initialization phase.

## Prerequisites and Script Locations

The reverse-skill repository provides platform-specific implementations to ensure cross-platform compatibility:

| Platform | Script Path | Source |
|----------|-------------|--------|
| Windows | `skills/scripts/case-init.ps1` | [`case-init.ps1`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/scripts/case-init.ps1) |
| Linux / macOS / Kali | [`skills/scripts/case-init.sh`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/scripts/case-init.sh) | [[`case-init.sh`](https://github.com/zhaoxuya520/reverse-skill/blob/main/case-init.sh)](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/scripts/case-init.sh) |

Both scripts enforce identical validation logic, including case name sanitization, network profile verification, and the generation of the **scope contract** as defined in [`skills/ops/scope-contract.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/ops/scope-contract.md).

## How to Run the Case Management Initiation Command

### Windows PowerShell Execution

On Windows systems, invoke the PowerShell script with the `-File` parameter, providing a hint describing the task and a unique case name:

```powershell
powershell -File skills/scripts/case-init.ps1 `
    -Hint "Web application penetration test" `
    -CaseName "web-pentest"

```

The script validates the case name, creates `work/web-pentest/`, and writes the initial [`scope.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/scope.md), [`timeline.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/timeline.md), and [`workitems.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/workitems.md) files.

### Linux, macOS, and Kali Execution

On Unix-like systems, use the Bash equivalent. You may additionally specify presets such as `offline-sample`, `ctf-public`, or `own-system`:

```bash
bash skills/scripts/case-init.sh \
    --hint "APK reverse-engineering" \
    --case-name "apk-demo" \
    --preset offline-sample \
    --sample ./app.apk

```

Both commands output a concise summary confirming the case directory, primary skill routing, and authentication status:

```

CASE -> /path/to/project/work/apk-demo
PRIMARY skill: skills/reverse-engineering/SKILL.md (R0)
auth.status=granted network_profile=authorized_target_only ready_for_act=true
NEXT: open PRIMARY SKILL.md and ACT within scope

```

## What Happens When You Initiate a Case

Running the **case management process** initialization performs five critical actions:

1. **Creates the case workspace** at `work/<case>/`, establishing the root directory for all evidence and logs.
2. **Generates [`scope.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/scope.md)** with authentication metadata, network profiles, and in-scope asset declarations as specified in [`skills/ops/scope-contract.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/ops/scope-contract.md).
3. **Registers the first timeline entry** in [`timeline.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/timeline.md), timestamping the case creation.
4. **Initializes [`workitems.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/workitems.md)** to track tasks and findings throughout the engagement.
5. **Sets the groundwork for routing** by identifying and linking the primary skill file (e.g., [`skills/reverse-engineering/SKILL.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/reverse-engineering/SKILL.md)).

These artefacts form the contract that downstream scripts—including `master-route`, `append-evidence`, and `case-review`—expect to find before executing.

## Authentication Gates and Security Enforcement

The `case-init` script establishes the **authentication gate** that subsequent commands must pass. Before any ACT command runs, the `case-guard` scripts (`skills/scripts/case-guard.ps1` or [`skills/scripts/case-guard.sh`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/scripts/case-guard.sh)) verify that:

- The [`scope.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/scope.md) file exists in the case directory.
- The field `auth.status` is explicitly set to `granted`.
- The network profile matches the operational context (e.g., `authorized_target_only`).

This enforcement prevents accidental execution of active testing commands against unauthorized targets. The `case-init` command sets `auth.status=granted` only after validating that the operator has explicitly acknowledged the scope boundaries.

## Integration with the reverse-skill Routing Workflow

According to the architectural documentation in [`skills/MASTER-ROUTING.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/MASTER-ROUTING.md), the **case-init** command is the bridge between high-level routing and skill execution. The workflow sequence is:

- **Step 1**: Routing logic identifies the appropriate skill domain.
- **Step 2**: The operator runs `case-init` to materialize the case context.
- **Step 3**: Scope validation occurs against [`skills/ops/scope-contract.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/ops/scope-contract.md).
- **Step 4**: `case-guard` verifies authentication and network constraints.
- **Step 5**: The primary skill ACT commands execute within the bounded context.

Skipping the `case-init` step breaks this chain; `case-guard` will refuse to execute ACT commands if the `work/<case>/` directory and [`scope.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/scope.md) file are absent.

## Summary

- The **`case-init` command** is the mandatory entry point for the reverse-skill case management process, implemented in `skills/scripts/case-init.ps1` (Windows) and [`skills/scripts/case-init.sh`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/scripts/case-init.sh) (Unix).
- Execution requires a **case name** and **task hint**, with optional **presets** for offline samples or CTF environments.
- The script creates the **`work/<case>/` directory** and populates **[`scope.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/scope.md)**, **[`timeline.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/timeline.md)**, and **[`workitems.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/workitems.md)**.
- **Authentication enforcement** is handled by `case-guard` scripts that depend on the [`scope.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/scope.md) generated during initialization.
- This initialization step is **architecturally required** before any ACT commands can execute, as documented in [`skills/MASTER-ROUTING.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/MASTER-ROUTING.md).

## Frequently Asked Questions

### What is the exact command to initiate a case in reverse-skill?

On Windows, run `powershell -File skills/scripts/case-init.ps1 -CaseName "<name>" -Hint "<description>"`. On Linux or macOS, run `bash skills/scripts/case-init.sh --case-name "<name>" --hint "<description>"`. These commands create the case directory and mandatory metadata files required for all subsequent operations.

### What files does the case-init command create?

The script generates three canonical files in `work/<case>/`: **[`scope.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/scope.md)** (containing auth status and network profile), **[`timeline.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/timeline.md)** (tracking chronological events), and **[`workitems.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/workitems.md)** (listing tasks and evidence). These files satisfy the contract defined in [`skills/ops/scope-contract.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/ops/scope-contract.md).

### How does reverse-skill enforce authentication before ACT commands?

The **`case-guard`** scripts (`case-guard.ps1` or [`case-guard.sh`](https://github.com/zhaoxuya520/reverse-skill/blob/main/case-guard.sh)) verify that [`scope.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/scope.md) exists and contains `auth.status=granted` before allowing any ACT command to run. This gate ensures that the operator has explicitly authorized the engagement scope during the `case-init` phase.

### Can I use presets when initiating a case?

Yes. The Bash implementation supports presets via the `--preset` flag, accepting values like `offline-sample`, `ctf-public`, or `own-system`. You can also attach sample files using `--sample <path>`, which the script references when generating the initial scope documentation.