Skip to content

Commit 3a0e6fa

Browse files
committed
remove: retire deprecated reverse-engineer-site builtin skill and clean up associated on-disk directory to prevent registry clutter
1 parent 32cf26b commit 3a0e6fa

1 file changed

Lines changed: 5 additions & 42 deletions

File tree

src/dao/browser/agent/dao_agent_skill_service.cc

Lines changed: 5 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -74,42 +74,6 @@ requiresPageContent: false
7474
```
7575
)";
7676

77-
// Built-in skill: reverse-engineer-site
78-
constexpr char kReverseEngineerSkillMd[] = R"(---
79-
name: reverse-engineer-site
80-
description: Systematically reverse-engineer the current site — enumerate resources, read source, and trace behavior back to concrete code.
81-
hosts:
82-
- "*"
83-
requiresPageContent: true
84-
---
85-
# Reverse-Engineer Site
86-
87-
## Goal
88-
Give the user an accurate, source-backed understanding of how the current page works — what stack it's built on, what endpoints it calls, what a specific behavior maps to in code.
89-
90-
## Workflow
91-
92-
1. **Enumerate** — call `list_page_resources` first. Group the output mentally into:
93-
- `Document` — main HTML and iframes
94-
- `Script` — split into app bundles vs. vendor libs by URL (look for `/static/`, `/_next/`, `/chunks/`, or filenames like `react-dom.production.min.js`)
95-
- `Stylesheet` / `Image` / `Font`
96-
- `XHR` / `Fetch` — runtime API calls (use `get_network_body` for these once `enable_network_tracking` is on)
97-
98-
2. **Pick a question, then the right tool:**
99-
- *"What framework does this use?"* — check `get_page_html` for root markers (`data-reactroot`, `ng-version`, `__NEXT_DATA__`, Nuxt/SvelteKit hydration tags) and cross-reference vendor bundle URLs.
100-
- *"How does action X work?"* — `search_in_resources` with likely keywords (the button label, event name, endpoint path). For each hit, open the file with `get_resource_content` and quote the surrounding lines.
101-
- *"What API does this page call?"* — run `enable_network_tracking`, reproduce the action via `click_by_ref`, then `get_network_requests` + `get_network_body` on the interesting ones.
102-
103-
3. **Summarize with citations.** Every claim should cite the source URL and line range, not just "I looked at the bundle".
104-
105-
## Rules
106-
107-
- **Never recommend bypassing DRM, authentication, subscription paywalls, or site ToS.** Decline politely and explain.
108-
- **Mention when code is minified** and offer to paste a specific section into a beautifier if the user wants it cleaned up. Don't dump a full minified bundle into the chat.
109-
- **Budget:** fetch at most 3 full resources before pausing to summarize, unless the user explicitly asks for more.
110-
- **Truncation awareness:** if a response has `truncated: true`, say so and offer to refetch a specific section by line.
111-
)";
112-
11377
// Trims leading and trailing whitespace from a string.
11478
std::string TrimString(const std::string& s) {
11579
std::string result;
@@ -176,13 +140,12 @@ void DaoAgentSkillService::InitBuiltinSkillsOnBackground(
176140
}
177141
}
178142

179-
// Write reverse-engineer-site skill if missing.
143+
// Remove deprecated reverse-engineer-site builtin skill from existing
144+
// profiles. This skill was previously written here but has been retired;
145+
// clean up the on-disk directory so it no longer shows up in the registry.
180146
base::FilePath reverse_dir = builtin_dir.AppendASCII("reverse-engineer-site");
181-
base::FilePath reverse_file = reverse_dir.AppendASCII(kSkillFileName);
182-
if (!base::PathExists(reverse_file)) {
183-
if (base::CreateDirectory(reverse_dir)) {
184-
base::WriteFile(reverse_file, kReverseEngineerSkillMd);
185-
}
147+
if (base::PathExists(reverse_dir)) {
148+
base::DeletePathRecursively(reverse_dir);
186149
}
187150
}
188151

0 commit comments

Comments
 (0)