Data skill#5
Open
mike-diamond wants to merge 4 commits into
Open
Conversation
Signed-off-by: MikeDiam <[email protected]>
Signed-off-by: MikeDiam <[email protected]>
Signed-off-by: MikeDiam <[email protected]>
Signed-off-by: MikeDiam <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR adds a new “stakewise-data-query” markdown-based skill (plus reference docs and schema snapshot), introduces a daily drift/health-check pipeline for endpoints/queries/schema, and refactors/extends the MCP server packaging and utilities to support a local HTTP server + MCP tools.
Changes:
- Add
data-skill/skill content (SKILL.md, references, schema snapshot, plugin metadata) and marketplace manifest. - Add maintenance scripts + CI workflows for query verification, schema drift detection, and skill frontmatter linting.
- Reorganize MCP server entrypoints/utilities and update package metadata to point at
mcp-server/*.
Reviewed changes
Copilot reviewed 20 out of 60 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| scripts/verify-queries.sh | Adds a curl/jq-based probe suite for subgraph/backend/RPC health and query shape verification. |
| scripts/snapshot-subgraph-schema.sh | Adds schema drift detection against upstream stakewise/v3-subgraph and optional snapshot update mode. |
| scripts/lint-skill-frontmatter.mjs | Adds validation for SKILL.md frontmatter and cross-checks with plugin.json + schema snapshot header. |
| scripts/build-llm-context.mjs | Builds a single bundled markdown context file from SKILL.md + ordered references. |
| README.md | Documents the “two paths” (skill vs MCP server), setup, layout, and maintenance pipeline. |
| pnpm-lock.yaml | Adds globals dependency lock entries. |
| package.json | Updates entrypoints/paths for MCP server, adds skill/drift scripts, and adds globals. |
| mcp-server/utils/types.d.ts | Introduces shared runtime/response typing for server/methods. |
| mcp-server/utils/state.ts | Adds shared in-memory runtime state (host/port/subgraph URL/address). |
| mcp-server/utils/server.ts | Implements the local HTTP server and lifecycle helpers. |
| mcp-server/utils/methods/saveAddress.ts | Adds endpoint handler to persist a user address in runtime state. |
| mcp-server/utils/methods/index.ts | Exports HTTP handlers as a single module. |
| mcp-server/utils/methods/helpers/shortenAddress.ts | Adds address-shortening helper. |
| mcp-server/utils/methods/helpers/parseDays.ts | Adds bounded parsing for days query parameter. |
| mcp-server/utils/methods/helpers/isValidVaultAddress.ts | Adds vault-address validation helper. |
| mcp-server/utils/methods/helpers/isValidUserAddress.ts | Adds “saved address exists” validation helper. |
| mcp-server/utils/methods/helpers/index.ts | Aggregates helper exports. |
| mcp-server/utils/methods/helpers/getStakeByVault.ts | Adds SDK-based per-(user,vault) stake/osToken/boost aggregation. |
| mcp-server/utils/methods/helpers/getSDK.ts | Creates the StakeWise SDK instance (mainnet config). |
| mcp-server/utils/methods/helpers/getBoostApyText.ts | Formats APY/boost APY display text. |
| mcp-server/utils/methods/helpers/formatTokenValue.ts | Adds token amount formatting for ETH/osETH-style values. |
| mcp-server/utils/methods/helpers/formatStakeText.ts | Renders a markdown summary for a user’s position in a vault. |
| mcp-server/utils/methods/helpers/formatNumberTokenValue.ts | Formats JS numbers as token amounts via parseEther + formatter. |
| mcp-server/utils/methods/helpers/formatApy.ts | Adds APY string formatting helper. |
| mcp-server/utils/methods/helpers/fetchSubgraph.ts | Adds a simple POST GraphQL fetch helper to the subgraph URL. |
| mcp-server/utils/methods/helpers/date.ts | Centralizes dayjs setup (utc + duration). |
| mcp-server/utils/methods/helpers/addNumberSeparator.ts | Adds a basic thousands-separator helper. |
| mcp-server/utils/methods/getVaultWhitelist.ts | Adds endpoint handler to fetch and render a vault’s whitelist. |
| mcp-server/utils/methods/getVaultsWithStake.ts | Adds endpoint handler to list all vaults a user interacted with + per-vault stats. |
| mcp-server/utils/methods/getVaultStats.ts | Adds endpoint handler for historical vault stats over N days. |
| mcp-server/utils/methods/getVaultsList.ts | Adds endpoint handler for listing all vaults sorted by APY (with caching). |
| mcp-server/utils/methods/getVaultQueue.ts | Adds endpoint handler for unstake/unboost queue status. |
| mcp-server/utils/methods/getVaultData.ts | Adds endpoint handler for public vault details. |
| mcp-server/utils/methods/getVaultBalance.ts | Adds endpoint handler for a user’s position in a specific vault. |
| mcp-server/utils/methods/getUserStats.ts | Adds endpoint handler for historical user stats in a vault over N days. |
| mcp-server/utils/methods/getCreatedVaults.ts | Adds endpoint handler for listing vaults administered by the saved address. |
| mcp-server/utils/index.ts | Re-exports server/state/methods types and helpers. |
| mcp-server/skills/stakewise-llm-tools/SKILL.md | Adds/updates the MCP-server skill documentation and usage instructions. |
| mcp-server/openclaw.plugin.json | Adds OpenClaw plugin manifest for the MCP server. |
| mcp-server/mcp.ts | Adds the MCP stdio server entrypoint with tool registration. |
| mcp-server/index.ts | Adds OpenClaw plugin entrypoint (starts server, registers reset command). |
| mcp-server/debug-server.ts | Adds a debug proxy to print formatted responses from the local HTTP server. |
| mcp-server/.mcp.json | Adds an example MCP client config (stdio via tsx). |
| mcp-server/.cursor/mcp.json | Adds Cursor MCP config example. |
| mcp-server/.codex/config.toml | Adds Codex MCP config example. |
| eslint.config.js | Adds node globals for scripts linting via globals. |
| data-skill/SKILL.md | Adds the new markdown-only “stakewise-data-query” skill definition and instructions. |
| data-skill/references/units-and-gotchas.md | Adds numeric unit rules, address casing rules, and other pitfalls. |
| data-skill/references/schema-snapshot.graphql | Adds pinned upstream schema snapshot for reference/verification. |
| data-skill/references/rpc-fallback.md | Documents public RPC fallback strategy and verified selectors. |
| data-skill/references/entities.md | Adds a use-case grouped schema digest for building correct queries. |
| data-skill/references/endpoints.md | Documents public subgraph/backend/RPC endpoints + rotation rules. |
| data-skill/.claude-plugin/plugin.json | Adds plugin metadata including pinned schema commit/date. |
| CODEOWNERS | Adds code owner assignments. |
| .npmignore | Excludes skill/docs/scripts/CI config from the published npm package. |
| .github/workflows/verify-queries.yml | Adds daily advisory drift checks that open issues on failures. |
| .github/workflows/lint-skills.yml | Adds advisory PR workflow for skill lint + mainnet smoke check. |
| .claude-plugin/marketplace.json | Adds Claude Code marketplace manifest for the data-skill plugin. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+33
to
+42
| const header = `# StakeWise data-query — universal LLM context | ||
|
|
||
| This file is a concatenation of the \`stakewise-data-query\` skill (SKILL.md + all references) intended for non-Claude LLMs. Claude Code users get this content automatically via plugin install; everyone else can paste the raw URL of this file into a system prompt, Perplexity Space, or Cursor \`@-mention\`. | ||
|
|
||
| **Raw URL:** \`https://raw.githubusercontent.com/stakewise/llm-tools/main/data-skill/llm-context.md\` | ||
|
|
||
| **Source repo:** https://github.com/stakewise/llm-tools | ||
|
|
||
| **Skill version:** \`0.1.0\` — generated by \`scripts/build-llm-context.mjs\`. Do not edit this file directly; regenerate from the source. | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.