I Built a 57-Page KYC Spec for Indian Stock Broking Using Claude Code ๐ฎ๐ณ๐ค
How an AI CLI tool helped me turn regulatory chaos into a published documentation site
I Built a 57-Page KYC Spec for Indian Stock Broking Using Claude Code ๐ฎ๐ณ๐ค
How an AI CLI tool helped me turn regulatory chaos into a published documentation site
Hereโs a fun fact: opening a stock trading account in India requires your data to pass through PAN verification (NSDL), KRA (5 agencies), CKYC (CERSAI), DigiLocker, bank penny drop, AML screening, eSign, 3 exchanges (NSE/BSE/MCX), and 2 depositories (CDSL/NSDL).
As an engineer, I needed to understand all of this. Not at a slide-deck level โ at a โwhich field goes where, in what format, with what validationโ level.
So I built a complete technical specification. 57 pages. 454 fields. 25+ vendor integrations. Published as a docs site.
And Claude Code โ Anthropicโs AI-powered CLI โ was my research partner throughout.
The Result ๐
**KYC Onboarding Specification** covers everything needed to build a KYC onboarding system for an Indian stock broking firm:
- ๐ฅ๏ธ A 9-screen mobile-first journey (~6 min, ~12 typed fields)
- ๐ 25+ vendor integrations with API specs, field mappings, and error handling
- ๐ญ 8 parallel batch pipelines for post-approval processing
- โ Maker-checker admin workflow for compliance review
- ๐ Full regulatory mapping to SEBI circulars, KRA rules, CKYC requirements
Why I Used Claude Code ๐ ๏ธ
Building this spec involved three types of work โ and Claude Code accelerated all of them:
๐ Research โ Vendor APIs, SEBI circulars, KRA file formats, CKYC specifications. Iโd ask Claude to extract, cross-reference, and structure. What used to take a full day of reading PDFs became a focused 2-hour session.
๐ Drafting โ For each screen or pipeline, Iโd describe the business flow. Claude would draft the technical spec โ API call sequences, field validation rules, error handling matrices. Iโd review and correct the domain-specific details.
๐๏ธ Building the site โ The docs site runs on Astro Starlight. Claude set up the project, created custom components, wrote the CSS (dark mode, responsive tables, scroll shadows), generated an OG image programmatically, and handled SEO setup โ JSON-LD, robots.txt, IndexNow submission to search engines. All from the terminal, no browser needed.
What Makes Indian KYC Uniquely Complex ๐งฉ
A few examples of the regulatory fun thatโs documented in the spec:
๐ Dual upload โ Since Aug 2024, brokers must upload to both KRA and CKYC. Different formats, different APIs, different error codes.
๐ 6-attribute matching โ Name, PAN, address, mobile, email, and income range must match across KRA, exchange, and depository records. One mismatch = application stuck.
๐ CKYC masking โ Since Jan 2025, CKYC search returns masked KIN numbers. You need a separate download API call to get the full record.
๐ Nominee rules โ Since Jan 2025, up to 10 nominees allowed. Opting out of nomination requires video verification. Thatโs a completely separate vendor integration.
๐ SEBI Stock Brokers Regulations 2026 โ Notified Jan 7, 2026. Entirely replaces the 1992 regulations. Every compliance process needs re-validation.
The Stack
WhatToolDocsAstro StarlightHostingGitHub PagesAIClaude Code (Opus)AnalyticsCloudflare Web AnalyticsSearchGoogle Search Console + Bing + Yandex + IndexNow
Check It Out
๐ Live: javajack.github.io/broking-kyc
Start with the User Journey if you want the product perspective, or Vendor Integrations if you want the engineering deep-dive.
The GitHub repo is public. PRs welcome.
Iโm Rakesh Waghela, a Tech & KYC Solutions Architect. Building fintech infrastructure for Indian markets.
๐ LinkedIn ยท ๐ฆ X (@webiyo) ยท ๐ Book a call
๋ฉํ๋ฐ์ดํฐ
- post_id
- 2b6ba7b871cc
- slug
- kyc-spec-for-indian-stock-broking-using-claude-code-2b6ba7b871cc
- url
- https://medium.com/@rakeshwaghela/kyc-spec-for-indian-stock-broking-using-claude-code-2b6ba7b871cc
- canonical_url
- https://medium.com/@rakeshwaghela/kyc-spec-for-indian-stock-broking-using-claude-code-2b6ba7b871cc
- author_url
- https://medium.com/@rakeshwaghela
- status
- ok
- fetched_at
- 2026-06-11 21:11:36