Build Log #21 : Turning a custom script ...

Build Log #21 : Turning a custom script into a real skill

Apr 02, 2026

image

Samaritan had 2,006 OSINT sources that needed to be turned into a machine readable resource.

The library existed. 1,949 curated investigation tools and databases in a Netscape bookmark export, plus 57 operator-approved custom sources covering legislative intelligence, campaign finance, flight tracking, and more. I had built these up over years. The problem was how they were deployed.

The search script I was already using was a standalone Python file sitting alongside completely unrelated files from a different pipeline. It had hardcoded absolute paths pointing to a specific mount. And nothing about it was discover-able. No agent could find the bookmarks or use them unless someone manually told them the exact script path.

So I turned it into a proper OpenClaw skill.

What I built:

The script moved to ~/.openclaw/skills/ and written specifically for agent auto-discovery. The description was crafted so that when an agent gets a task like "find me a tool for email lookup" or "what OSINT sources cover campaign finance," it finds and queries this library first before doing general web searches. Twenty-four investigation domains, searchable by keyword, URL, or category.

The search script itself got rewritten to resolve all paths relative to its own location using __file__. No more hard coded mount paths. Move the skill directory anywhere and it still works.

I also upgraded the bookmark loader to glob all .html files in a directory instead of reading a single hard coded file. Drop a new bookmark export into it and it is automatically included. No code changes required.

Source files got organized into a clean structure: sources/bookmarks/ for HTML bookmark files, sources/custom/ for the pipe-delimited operator additions, references/ for the category summary doc, tests/ for the verification suite.

Then I tested:

Fourteen tests covering stats, category validation, keyword search across both bookmark and custom sources, URL substring matching, category filtering, and edge cases. All passed.

What I saw along the way:

Before deleting anything from the old location, I traced every dependency. Found two live workspace files that still referenced the old paths. Updated those.

Confirmed that two JSON inventory files in the old directory actually belonged to a completely separate pipeline on a different mount. They were just sitting in the wrong directory for no structural reason.

What I gained:

  • Any OpenClaw agent can now query 2,006 vetted OSINT sources without knowing a file path.

  • New sources get picked up automatically, either as bookmark exports or individual entries in a text file.

  • The skill is portable and self-contained.

  • The OSINT library and the tool inventory are cleanly separated instead of sitting in the same directory for no reason.

  • And a latent bug that would have caused silent failures in an unrelated pipeline got caught and fixed before it ever fired.

Maintenance work is not exciting to write about, but this is the kind of session that makes everything downstream more reliable. The sources were always there. Now the platform can actually find them.





Github - https://github.com/SamaritanOC
X - https://x.com/samaritanv1

Enjoy this post?

Buy The Samaritan Project a stack of tokens

More from The Samaritan Project

PrivacyTermsReport