feat: add SkimReaderTool (x402-native clean web reader)#6264
feat: add SkimReaderTool (x402-native clean web reader)#6264JessieJanie wants to merge 1 commit into
Conversation
Adds SkimReaderTool, a pay-per-call clean web reader for agents. Returns agent-ready Markdown + structured metadata for any URL, paying $0.002/call in USDC on Base over the x402 protocol (no API keys, no signup).
📝 WalkthroughWalkthroughAdds ChangesSkimReaderTool: x402 Pay-per-call URL Reader
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
lib/crewai-tools/pyproject.toml (1)
29-33: 💤 Low valueInconsistent
requestsversion lower bound.The main dependencies (line 12) specify
requests>=2.33.0, but theskimextra allows>=2.31.0. This inconsistency won't cause issues when both are installed together, but consider aligning versions or omittingrequestsfrom the extra since it's already a main dependency.Suggested fix
skim = [ "x402[evm]>=2.0.0", "eth-account>=0.13.0", - "requests>=2.31.0", ]Or align the version:
- "requests>=2.31.0", + "requests>=2.33.0",🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@lib/crewai-tools/pyproject.toml` around lines 29 - 33, The skim extra dependencies list includes requests>=2.31.0, but the main dependencies already specify requests>=2.33.0, creating an inconsistency. Either remove the requests dependency from the skim extra list entirely since it is already specified as a main dependency, or if you must keep it in the skim extra, update it to requests>=2.33.0 to align with the version constraint specified in the main dependencies section.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@lib/crewai-tools/src/crewai_tools/tools/skim_reader_tool/README.md`:
- Around line 20-22: The fenced code blocks in the README.md file are missing
explicit language labels, which violates the MD040 markdown linting rule. Add
the language identifier `bash` to both unlabeled code blocks: change the opening
fence on line 20 (before the pip install command) from three backticks to three
backticks followed by `bash`, and similarly update the opening fence on line 27
(before the export SKIM_WALLET_PRIVATE_KEY command) to include the `bash`
language label.
---
Nitpick comments:
In `@lib/crewai-tools/pyproject.toml`:
- Around line 29-33: The skim extra dependencies list includes requests>=2.31.0,
but the main dependencies already specify requests>=2.33.0, creating an
inconsistency. Either remove the requests dependency from the skim extra list
entirely since it is already specified as a main dependency, or if you must keep
it in the skim extra, update it to requests>=2.33.0 to align with the version
constraint specified in the main dependencies section.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 38d0e104-48d8-46bb-91b7-004ea1990bc7
📒 Files selected for processing (8)
lib/crewai-tools/pyproject.tomllib/crewai-tools/src/crewai_tools/__init__.pylib/crewai-tools/src/crewai_tools/tools/__init__.pylib/crewai-tools/src/crewai_tools/tools/skim_reader_tool/README.mdlib/crewai-tools/src/crewai_tools/tools/skim_reader_tool/__init__.pylib/crewai-tools/src/crewai_tools/tools/skim_reader_tool/skim_reader_tool.pylib/crewai-tools/tests/tools/skim_reader_tool_test.pylib/crewai-tools/tool.specs.json
| ``` | ||
| pip install "x402[evm]" 'crewai[tools]' | ||
| ``` |
There was a problem hiding this comment.
Add explicit fence languages to satisfy Markdown linting
Line 20 and Line 27 use unlabeled fenced code blocks, which triggers MD040. Please label both as bash.
Suggested patch
-```
+```bash
pip install "x402[evm]" 'crewai[tools]'- +bash
export SKIM_WALLET_PRIVATE_KEY=0xYOUR_BASE_WALLET_PRIVATE_KEY
Also applies to: 27-29
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 20-20: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@lib/crewai-tools/src/crewai_tools/tools/skim_reader_tool/README.md` around
lines 20 - 22, The fenced code blocks in the README.md file are missing explicit
language labels, which violates the MD040 markdown linting rule. Add the
language identifier `bash` to both unlabeled code blocks: change the opening
fence on line 20 (before the pip install command) from three backticks to three
backticks followed by `bash`, and similarly update the opening fence on line 27
(before the export SKIM_WALLET_PRIVATE_KEY command) to include the `bash`
language label.
Source: Linters/SAST tools
What
Adds
SkimReaderTool— a clean web reader for agents. Give it any URL and it returns agent-ready Markdown (nav, ads, and boilerplate stripped) plus structured metadata (title, byline, published date, language, excerpt).It is built on the x402 payment protocol: each read costs $0.002 in USDC on Base, paid automatically by a wallet the user controls. There is no signup and there are no API keys — the wallet is the identity. The private key never leaves the user's machine; it only signs an EIP-3009 USDC authorization locally.
Why
CrewAI already ships several scraping/reader tools, but none are pay-per-call over an open payment rail.
SkimReaderToolgives agents a no-signup, no-API-key way to read the web and pay only for what they use — a natural fit alongside the existing Firecrawl/Scrape tools.Usage
Install the x402 EVM client alongside crewai-tools:
Changes
src/crewai_tools/tools/skim_reader_tool/(tool +README.md)src/crewai_tools/tools/__init__.pyandsrc/crewai_tools/__init__.pyskimextra inpyproject.toml(x402[evm],eth-account,requests); deps are imported lazily so the tool only requires them when runtests/tools/skim_reader_tool_test.py(no network — a fake payment-aware session is injected)tool.specs.jsonto include the new entryNotes
x402[evm],eth-account,requests) are imported inside_get_session(), so importing the tool has no new hard dependencies.tool.specs.jsonwas regenerated to match the existing format; if maintainers prefer, theGenerate Tool Specificationsworkflow can re-run it on merge (it is gated to same-repo PRs, so it does not run on forks).Summary by CodeRabbit
New Features
Documentation