| name | update-solution |
| description | Collect solutions from all target/ directories and merge them into .pentester/solutions.md without deleting any existing solutions. Manually triggered via /pentester:update-solution. |
Update Solutions Knowledge Base
This skill collects all solutions.md files from individual target directories and merges them into the central .pentester/solutions.md knowledge base.
Critical Rule
NEVER delete or overwrite existing solutions in .pentester/solutions.md. Always APPEND only. The central file is a cumulative knowledge base that grows over time.
When to Use
- Manually invoked by user via
/pentester:update-solution
- Suggest to user after successful exploitation or when solutions accumulate in target directories
- Suggest when report generation is triggered (run before gen-report to ensure knowledge base is current)
Process
Step 1: Discover Source Solutions
Find all target/*/solutions.md files in the project:
target/192.168.39.7/solutions.md
target/192.168.39.8/solutions.md
For each file found, read its full content.
Step 2: Read the Central Solutions File
Read .pentester/solutions.md to understand:
- The current structure and formatting conventions
- Which targets and solutions are already documented
- Where to append new content
Step 3: Identify New Entries
For each target/${IP}/solutions.md, compare against .pentester/solutions.md:
- If the target IP section already exists in the central file, only add new solution entries that are not already present.
- If the target IP section does not exist, append the entire section.
Key indicators of a "new" solution: unique problem description, unique solution method, or new target IP.
Step 4: Merge and Append
Append new solutions to .pentester/solutions.md following the existing format:
## Target-Name (IP) - YYYY-MM-DD
### N. Problem Title
**问题**: Problem description in Chinese.
**解决**: Solution steps, commands, and explanations.
Rules:
- Header normalization: Always use
## (h2) for target sections — never # (h1) or ### (h3)
- Maintain the same heading hierarchy and formatting style
- Keep the chronological order (newest at bottom or maintain existing ordering)
- Deduplication: Compare by problem description similarity — if a solution with the same core problem already exists under the same target IP, skip it
- Include the source reference (which
target/${IP} directory it came from)
- Each solution entry must include: problem description AND solution
- Number solution entries sequentially within each target section
Step 5: Verification
After merging, verify:
Output
- Inform the user how many new solutions were added and from which target directories.
- Show a brief summary of the new entries added.