โ† Back to list

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

Rakesh Waghela ยท 2026-02-13 20:47 ยท 0 claps ยท 2.2 min read
#kyc #onboarding #compliance #sebi #kra
Open on Medium โ†—
Wiki topics: LLM ยท Large Language Models

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