What Is the Purpose of the Case Initialization Script in Reverse-Skill?
The case initialization script in reverse-skill creates a governed workspace that enforces authorization before any offensive security or reverse engineering activity can proceed.
Every engagement in the reverse-skill repository begins with a mandatory setup step. The case-init.ps1 (PowerShell) and case-init.sh (Bash) scripts serve as the entry point that prepares a new analysis case, ensuring that all subsequent tools operate within a documented, auditable scope. This design prevents unauthorized actions by making explicit permission a hard dependency for "ACT" operations like remote exploitation or live traffic interaction.
Core Responsibilities of the Case Initialization Script
The script performs four critical functions that establish the foundation for every reverse-skill engagement.
Create the Case Workspace
The script generates a standardized directory structure under work/<case>/ that houses all artifacts for the project. This layout includes:
scope.md— the formal scope and authorization contracttimeline.md— a chronological record of work itemsworkitems/— a folder for individual evidence items
The directory structure follows the repository tree defined in the README, ensuring consistency across all cases regardless of platform.
Populate the Scope Document
The script writes a minimal but essential scope.md file that records:
| Field | Description |
|---|---|
hint |
The task description supplied via --hint "<task>" |
case-name |
The identifier provided via --case-name "<name>" |
auth.status |
The authorization state (must be granted for ACT operations) |
network_profile |
The operational context (e.g., lab, authorized_target_only) |
This file acts as the hard gate that all later scripts consult. Without auth.status: granted, the framework aborts destructive or network-exposing actions with a clear error.
Enforce the Authorization Rule
Before any offensive action, reverse-skill validates that scope.md contains auth.status = granted and that the network_profile is legal. This enforcement is documented in [RULES.md](https://github.com/zhaoxuya520/reverse-skill/blob/main/RULES.md#case-init-script) and explained narratively in [skills/field-journal/precedent-auth.md](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/field-journal/precedent-auth.md).
The case initialization script is therefore not merely administrative—it is the mandatory authorization step that makes the entire governance model possible.
Provide a Cross-Platform CLI
The script exposes a uniform interface across operating systems:
Windows PowerShell:
powershell -File skills/scripts/case-init.ps1 -Hint "<task>" -CaseName "<case>"
Linux/macOS/Kali Bash:
bash skills/scripts/case-init.sh --hint "<task>" --case-name "<case>"
Optional arguments support presets for offline samples, explicit network targets, or custom project roots. Full documentation appears in [README_AI.md](https://github.com/zhaoxuya520/reverse-skill/blob/main/README_AI.md#case-init-script).
Practical Usage Examples
Create a CTF Case (Linux/macOS)
bash skills/scripts/case-init.sh \
--hint "CTF web challenge" \
--case-name "ctf-2026-web" \
--preset ctf-public \
--target-url https://challenge.example
Create an Offline Malware Case (Windows)
powershell -File skills/scripts/case-init.ps1 `
-Hint "Analyze malicious APK" `
-CaseName "apk-sample" `
-Preset offline-sample `
-Sample ".\malware.apk"
Verify Case Initialization (Any Platform)
cat work/ctf-2026-web/scope.md
Expected output includes:
auth:
status: granted
network_profile: authorized_target_only
hint: CTF web challenge
Key Source Files
| Path | Purpose |
|---|---|
skills/scripts/case-init.ps1 |
PowerShell implementation |
skills/scripts/case-init.sh |
Bash implementation (Linux/macOS/Kali) |
RULES.md |
Central policy defining the auth-granted gate |
skills/field-journal/precedent-auth.md |
Narrative explanation of authorization requirements |
README_AI.md |
User-facing documentation with examples |
Summary
- The case initialization script is the mandatory first step for every reverse-skill engagement.
- It creates a governed workspace with
scope.md,timeline.md, andworkitems/underwork/<case>/. - It enforces authorization by requiring
auth.status: grantedbefore any ACT operations. - It provides a consistent CLI across Windows PowerShell and Unix-like shells.
- Without successful case initialization, the framework blocks all destructive or network-exposing actions.
Frequently Asked Questions
What happens if I try to run an ACT operation without initializing a case?
The framework aborts with an error. All scripts that perform "ACT" operations—remote exploitation, live traffic interaction, or other potentially harmful actions—check scope.md for auth.status: granted before proceeding. If the guard fails, execution stops immediately.
Can I customize the case workspace location?
Yes. The script accepts an optional project root argument. Both case-init.ps1 and case-init.sh allow you to specify custom paths when the default work/ directory does not suit your environment.
Why are there two separate script implementations?
Platform parity. The PowerShell version (case-init.ps1) serves Windows environments natively, while the Bash version (case-init.sh) covers Linux, macOS, and Kali Linux. Both enforce identical semantics and produce interchangeable scope.md files.
What presets are available for different engagement types?
The script supports presets like ctf-public for competition challenges and offline-sample for isolated malware analysis. Presets automatically configure appropriate network_profile values and validation rules without manual specification.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →