Skip to content

Data skill#5

Open
mike-diamond wants to merge 4 commits into
mainfrom
data-skill
Open

Data skill#5
mike-diamond wants to merge 4 commits into
mainfrom
data-skill

Conversation

@mike-diamond
Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings May 12, 2026 11:53
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants