diff --git a/scripts/rsw/internal/cmd/page.go b/scripts/rsw/internal/cmd/page.go
index 8681fb5..1cdc2fa 100644
--- a/scripts/rsw/internal/cmd/page.go
+++ b/scripts/rsw/internal/cmd/page.go
@@ -12,15 +12,18 @@ import (
func newPageCmd() *cobra.Command {
var pageSection string
+ var complete bool
cmd := &cobra.Command{
Use: "page
",
Short: "Fetch and display a wiki page",
- Long: `Fetches a wiki page and renders it as markdown. Optionally filter
-to a specific section.
+ Long: `Fetches a wiki page and renders its table of contents by default.
+Use --section to get a specific section, or --complete for the full page.
Examples:
rsw osrs page "Dragon scimitar"
+ rsw osrs page "Dragon scimitar" --section "Combat styles"
+ rsw osrs page "Mining" --complete
rsw rs3 page "Mining" --section "Training"`,
Args: cobra.MinimumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
@@ -74,13 +77,19 @@ Examples:
md.HR()
}
- md.Line(htmlconv.Convert(page.HTML))
+ if complete {
+ md.Line(htmlconv.Convert(page.HTML))
+ } else {
+ md.Line("Use --section to fetch a specific section, or --complete for the full page.")
+ }
+
fmt.Print(md.String())
return nil
},
}
cmd.Flags().StringVar(&pageSection, "section", "", "Fetch only the named section")
+ cmd.Flags().BoolVar(&complete, "complete", false, "Fetch the complete page content (default shows TOC only)")
return cmd
}
diff --git a/skills/wiki/SKILL.md b/skills/wiki/SKILL.md
index 5150dab..8a85ac9 100644
--- a/skills/wiki/SKILL.md
+++ b/skills/wiki/SKILL.md
@@ -37,9 +37,14 @@ The first argument is always the game: `osrs` or `rs3`.
Full-text search across wiki pages. Returns ranked titles with snippets.
Use this to find the right page name before fetching details.
-### rsw page [--section ]
-Fetch a wiki page as cleaned markdown. Use `--section` to get just one section
-(e.g., "Drops", "Strategy", "Requirements"). Use `--raw` for raw wikitext.
+### rsw page [--section ] [--complete]
+Fetch a wiki page. By default, returns only the table of contents (section list)
+to conserve context. Use `--section` to fetch a specific section (e.g., "Drops",
+"Strategy", "Requirements"). Use `--complete` for the full page content.
+Use `--raw` for raw wikitext.
+
+**Recommended workflow:** First call `page` (no flags) to see available sections,
+then call `page --section ` to fetch only what you need.
### rsw item [--ironman]
The workhorse for "where do I find X" questions. Returns:
@@ -87,7 +92,8 @@ When a user asks a RuneScape question, think about which command(s) to combine:
→ `rsw osrs price "abyssal whip"`
**"What's a good money maker at 80 combat?"**
-→ `rsw osrs search "money making"` → then `rsw osrs page "Money making guide"`
+→ `rsw osrs search "money making"` → then `rsw osrs page "Money making guide"` (TOC)
+→ then `rsw osrs page "Money making guide" --section "Combat"` for relevant section
### Inferring the game