- The Claude Code SDK offers programmatic access to the Claude Code agent, enabling developers to integrate its AI capabilities into headless environments and custom applications.
- This SDK functions like a powerful Unix tool, allowing for advanced CI automation, custom linters, and intelligent chatbots through structured output and granular permission controls.
- The Claude GitHub Action, built upon this SDK, automates various development tasks like code review, feature generation from issues, and pull request modifications, leveraging existing GitHub infrastructure.
Building headless automation with Claude Code | Code w/ Claude
- The Claude Code SDK provides programmatic access to the Claude Code agent, allowing integration into headless environments and enabling new automation possibilities.
- Utilize
Claude-Pas the primary command-line interface for interacting with Claude Code, treating it like a Unix tool for piping data in and out. - Grant specific permissions using
--allow-tools(e.g.,write,bash npm run build,npm test) to enable Claude Code to perform destructive or build-related actions safely. - Leverage structured output via
--output-format JSONorstream JSONto parse Claude Code's responses programmatically, which is essential for building applications and integrations. - Use the
session IDreturned by Claude Code in structured output to resume previous contexts, enabling interactive, multi-turn conversations and workflows. - The Claude GitHub Action can automate code reviews, generate new features from GitHub issues, triage bugs, and modify existing pull requests by adding commits, all without needing custom infrastructure.
- Install the Claude GitHub Action directly in your repository using the
/install GitHub actioncommand within Claude Code, which generates a YAML configuration PR for easy setup. - Explore the open-source Claude Base Action and PR Action, built on the SDK, for inspiration on how to extend and customize Claude Code's automation capabilities.
Claude Code SDK — A software development kit that provides programmatic access to the Claude Code agent, allowing developers to integrate its capabilities into their applications and workflows.
Headless Node — Running an application or service without a graphical user interface, typically in a server environment or for automation scripts.
Unix tool — A program designed to perform a specific function, often used in command-line pipelines to process text or data, emphasizing composability.
CI automation — The process of automating tasks within continuous integration pipelines, such as code reviews, linting, or feature generation.
Claude-P — A command-line utility used to interact directly with the Claude Code agent, often for ad-hoc queries or automation.
--allow-tools — A command-line flag used to explicitly grant Claude Code permissions to use specific tools (e.g., for file system writes, running scripts) for a given task.
--output-format JSON — A command-line flag to configure Claude Code's response format to be structured JSON, making it machine-readable and parsable.
session ID — A unique identifier returned by Claude Code that represents the state and context of a specific interaction or task, allowing for session resumption.
--permission-prompt-tool — A command-line flag that delegates tool permission management to an external service, allowing real-time user prompts for tool access.
GitHub Action — An event-driven automation tool provided by GitHub, enabling custom workflows to be run directly in a repository's CI/CD pipeline.
Good afternoon, everybody. My name is Sid by the Saria. I am an engineer on the Claude Code team. And today, we're going to be talking a little bit about the Claude Code SDK and the Claude GitHub action that was just announced today. Cool. So a little bit about the agenda. We do a little quick start for the SDK, just to give some examples of how to get started and how to use the SDK. We will then dive into a live demo of the GitHub action, which should be fun. The GitHub action was built on top of the SDK, so it's meant to be a source of inspiration for the kind of things that you can do using the Claude Code SDK. We'll then dive into some more advanced features of the SDK. And then we'll end with having all the few set up the Claude GitHub action on your repost. You guys can start using it and build on top of it. Cool. Actually, before we get started, can I get a show of hands here? How many people have used Claude Code? OK. So a lot of people. And of the people who have used Claude Code, how many have used Claude Dash P or know what that is? OK. Far fewer people. It's good to know. If you guys don't have Claude Code in a laptop, that's how you get it. I encourage you to install it in a laptop and follow along. There will be parts of this talk that will be beneficial to follow along. And then if you don't want to, you don't have to. It's all you had. Cool. So what is the Claude Code SDK? It is a way to programmatically access the power of the Claude Code agent in Headless Node. This is powerful because it's a new kind of primitive and a new kind of building block that allows you to build applications that just weren't possible before. Things that you can do with the SDK are super simple things to get started. For example, you can use it like a Unix tool. The Unix is tool philosophy is what really makes Claude Code powerful because you can plug it in anywhere where you can run Bash or a terminal. So you can use it in your Unix pipelines. You can pipe stuff into it, pipe stuff out of it, have make complex chains out of it and stuff like that. You can then build CI automation on it. So you can have Claude review your code. Some people actually get Claude to write new linters for them too. Then you can go into your code if there are specific things that you've gone to define programmatically. You can get Claude Code to do it. And then we get into fans here applications as well. So if you want to build your own chat bot that's powered by Claude Code, that's certainly possible. If you want Claude Code to write you code in a new environment or a separate remote environment, you can build those kinds of applications as well. And finally, there are a few features. We talk more about the features in the coming slides. Python and TypeScript SDKs or bindings for the Claude Code SDK coming up soon. So that should make it much easier for you guys to consume it and build on top of it. So let's jump into some basic examples. Calling Claude Code SDK is as simple as doing Claude-P and following it up with the string that you want to ask Claude. So in this example, I'm telling Claude to write me a Fibonacci sequence generator. And if you notice, I also give it a dash, dash, allow tools write, which is a way for me to proactively give it access to the right tool. So it can write files to my file system. And then this is something I like doing too. Piping logs to Claude. So you can do cat.app.log and then pipe that into Claude-P. I don't like looking at logs manually. So this is something I do quite often. And as you can see, it does a pretty decent job of summarizing what the log failures were. Similarly, if you're anything like me, I just can't get myself to understand the output of ifconfig. I still don't know what it means, but Claude does. And Claude does it for me over here. And finally, this is what makes the SDK take. It is we have an output format. If you do a dash, dash, output format, JSON, Claude Code will actually output things, or its response, in JSON as opposed to plaintext. And you can parse this JSON and build on top of it. So we'll talk more about details for how this is what else you can do with this JSON. But I wanted to throw that example out there. Let's get into a significantly more complex example now, which is the Claude GitHub Action. So the log GitHub Action was built on top of the SDK. And it can be used to review code. It can be used to create new features. It can be used to triage bugs and so on. And this is also open source. So I'll include a link at the very end of the talk, so you guys can go have a look at the source for inspiration for how to use it. But for now, let's jump into a live demo on my laptop. So I have cloned a popular, small open source quiz app for the purposes of this demo. And we are going to fire it up just to see how that works. And then we will talk a lot to build something on top of it for us. So I just did an NPM start, which opened up my shiny new quiz app. It's actually pretty nifty. It allows you to choose a bunch of categories, how many questions you want. Difficult, it's definitely easy for me. I suck at trivia. Type of questions. And then there's a countdown timer. So we're not going to actually answer these unless someone feels very strongly pleased to shout out the answer. But I'm just going to just fly through these just to show you guys how this like the quiz app works. There you go. Not surprising. You got a great F. But that's OK. So this was the little demo quiz app that's open-sourced. And if you look at the issues for this repo, we see a couple very interesting ones. There's one issue that says we should add power-ups for 50-50 elimination of options and skip questions for free. Because I suck at trivia, I really like that feature. And I want to build it. And before this presentation, I already installed Claude, the Claude GitHub action on my repo. So it's already available. But we'll go over how to set that up later, too. OK. So here's the issue. It has pretty sparse details on how to implement this. It's just literally a wish list, really, like a wish feature. It's saying add a power-up option in the config 50-50 elimination for the skip question. It should award user points even though the user skipped. And the user should be able to configure this from the config page. So there's a lot of like creative room for Claude to do whatever it wants to do in this case. And I'm excited to see what it actually ends up building. So what I'm going to do is say, at Claude, please implement this feature and comment on it. So it usually does take four or five seconds for it to respond. And while it's doing that for good measure, we'll just also take this other GitHub issue. This is talking about a per question timer. So we saw there was a global timer on the quiz app, but there was no per question timer. So that's what this one's talking about. So let's go and say, Claude, please build this. And now we have two things building. Cool. Now when I get back to this tab, you see that Claude responded with a comment on this GitHub issue, saying that it's working. It also has a link to the job run, which is the GitHub action run. If I click into it, and if I actually click on the logs, I'll see that it's doing a bunch of stuff. You can see all this JSON being output. This is from the SDK. So you want to look at the JSON too much, because it's not much fun to parse it manually. But over here, we can see that it also created a 2DList for us. So Claude's now going to actually go through this 2DList and try to implement the power of feature. And similarly, for the question timer, it's going to do something similar. One more thing that we should do here is there are already a couple of pull requests that have been opened for this repo. And let's get Claude to review it or change some of these pull requests, just for fun. There's this one, which is Change Background Color to Blue. All right, I actually think I like green better. So I'm just going to be like, all right, Claude, please change this to green. This one is fairly easy. And I'm pretty sure Claude's going to do this. But I just wanted to show you guys that it can also add commits for a pull request that's already open. OK, so this is going to take a few minutes to run, and while this runs, let's go back to the presentation and then we'll check up on how this is doing towards the end. OK, cool. So let's do a little bit of a deep dive on the features of the SDK. When you call Claude-P by default, it has no edit or destructive permission access, which is great for safety, but it's not great for actually getting things done, which is why there is a dash-dash allowed tools option, which allows you to pre-configure Claude with any permissions that you think it might need in the future for your given task. So in this case, the first example you see that I've given it permissions, bash permissions to NPM run build, NPM test, and the right tool, which is a good set of permissions, because this allows Claude self-verify what it's writing and build your project and test and then continue writing. Similarly, for MCP, if you have MCP servers configured, you can allow list those MCP tools as well. So it's a very similar process. Then structured output. We already saw an example of structured output, both from the GitHub actions logs and also the little screenshot I showed you earlier. But there's two modes here. There's stream JSON and JSON. It does exactly what it sounds like. If you select stream JSON, it'll actually stream messages to you as and when they're available. Versus JSON will just give you one giant flaw of JSON at the end. And parsing this JSON and building on top of it is really how you can make use of the Claude Code SDK and create features for your users. And then you can also configure the system prompt. So you can do dash-ass system prompt, talk like a pirate, and you can get Claude Code to talk like a pirate for the rest of your day, which is actually quite fun. If you haven't done it, I'd encourage you to try it out. We also have a few user interaction features built into the SDK. And what that means is that the first one is resuming session state. So when you call Claude-p in structured output or JSON mode, it's going to return a session ID. And this session ID is useful because you can then reference the session ID to go back to the same context state that Claude had when it finished that process. So by preserving these session IDs and keeping track of them, you can enable or build user interactive features, the user says something, you pass that on to Claude. Claude returns a response, and now you want the user to give feedback on that response. And that's how this kind of enables you to build those types of interactions in your apps. And then the last one, and this one's actually pretty interesting, and it's fairly recent too. It's dash-dash permission prompt tool. We talked a little bit about how to give Claude permissions using the allowed tools flag. And that requires you to pre-configure them in advance. But what if you didn't want to do them? Because you don't know what tools Claude would want to use in the future. In that case, you can use the dash-dash permission prompt tool and offload the permission management to an MCP server. So you can ask users in real time for whether they want to accept a tool or reject a tool. And you can have an MCP server kind of handle that for you, as opposed to trying to predict which tools are OK and which tools are not. So this is fairly recent, and we'd love to get feedback on this if you guys end up trying it out. OK, let's go back to our demo and see what Claude's done. So this is the power-up issue. We can see that Claude has actually gone through his to-do list. I'm going to open a PS. There's a link over here to create a PR, and I'm going to click that and see what that gives us. I'll actually create the pull request too, so it's easier for us to review. I don't really know how this codebase works, but we'll still eyeball it just as you see if it's doing the right thing. So you see some set power-up stuff. Seems all right. There's some configuration in the main component. All right, I think what we should do, and what would make this fun, is if you should just get this branch locally and see what Claude did, because there's no way that we can actually figure out what it did in the short amount of time that we have. So I'm going to go back to my terminal, do a good fetch, check out the branch that Claude just created, and restart our process. OK, awesome. It looks like we have a power-up section now at the bottom of our config page, and it's a little check box. I like that touch. We'll keep both of them on, and let's select general knowledge. Let's start playing this game. Let's see what it did. Oh, sweet. So you see it has this little 50-50 button on the bottom left, and a skip questions button on the right. I'm just going to add 50-50 because I have no idea what the answer this is. Does anybody know what that is? D? OK, there we go. That makes sense. Cadbury, yeah. I'm going to skip this one, and then let's just breeze through the other ones for a sake of time. So we've got an F, but we got one correct answer, which is better than zero correct answers. And yeah, I guess. Yeah, I tricked us. That was a good one. But yeah, it seems like it worked. I think there's definitely more we could do here. We could show how the power, which questions we use the power upon over here. And there's definitely more we can do. But at the most basic level, I think Claude was able to do with the task that we assigned it to do, which is exciting. This is kind of the power of the GitHub action, because you don't really have to run this on your own in-fra. You can just literally comment on a thread saying, please build this for me. It uses your GitHub action runners and just does the thing. Let's also look at the PR that we told it change from blue to green. It's all hex code, so let's just see what it did in the commits. So we see there's two commits. And Claude has added this last one to switch it from blue to green. And it did it for all three of the places where the color was defined, which is awesome. I'm not going to go over the last one, the question timer, because we might run out of time. But this hopefully gives you insight into what the Claude GitHub action can do for you. Let's go back to the presentation now. So just as a recap, the Claude GitHub action, as it's implemented today, is able to read your code. It's able to create PRs for you from GitHub issues, like we just saw. It's able to create commits for you. So if you already have a PR and you comment on it, it can add a commit to an existing branch or an existing PR. It can answer questions. It doesn't have to do something. It can just literally answer questions for you. If you don't understand something, you can be like, hey, Claude, how does this work? And you can get it to answer questions. And it can of course review your code. The best part of all of this is that you don't have to take care of the infer. It runs on existing GitHub runners, which almost everyone has configured if you're using GitHub actions. So that's kind of the really nice thing about this is you don't have to worry about any of the infer. So how were the actions built? I may have mentioned that these actions were built on top of the SDK. So the SDK does form the foundation of how these actions were built. And then we have two other actions on top. We have the Claude base action. This is a thin layer that just implements the piece which talks to Claude code and returns the response from Claude. And then we have another action on top of this, which is called the PR action. And this action is responsible for all the fancy things that you saw on the PR. So it's responsible to make in comments for the to-do lists, for rendering it the right way, for adding the PR links, and things like that. So it's kind of three layers in which it's built. Both the base action and the PR action are open-source. So I would encourage you guys to go have a look, take inspiration from how that works, and maybe that inspires more ideas. Yeah. And then finally, you guys can install the Claude GitHub actions today. The easiest way to do this is to open up Claude code in a terminal in the repo that you want to install it in. And once you open up Claude code, just do slash install GitHub action. And that is going to present you with a nice flow, which guides you through configuring your GitHub action as well as merging it. So the end result of this would be a PR, which would be a YAML file for your GitHub action. And once you merge that in, and you configure your API keys and things like that, you're off the races. And you can go ahead and start tagging Claude and using Claude, like we just did right now. Small caveat. If you're a bedrock or vertex user, the instructions are a little bit different, and the tiny bit more manual. So please have a look at the docs. The docs are pretty comprehensive in helping you set up the GitHub action for both bedrock and vertex. Cool. Finally, resources. These are resources for things that we've talked about today. If you want to snap a picture, go ahead. There are open source three posts for both the base action and the Claude code action are here. And we absolutely love your feedback as well. So if you guys have any feedback on the SDK, on the GitHub action, or on Claude code, please go to our public Claude GitHub repo and file an issue there. And someone will have a look and get back to you. Cool. That's all I have for today. Thanks for joining me. And I hope you guys have a good rest of the day.
TL;DR
- The Claude Code SDK offers programmatic access to the Claude Code agent, enabling developers to integrate its AI capabilities into headless environments and custom applications.
- This SDK functions like a powerful Unix tool, allowing for advanced CI automation, custom linters, and intelligent chatbots through structured output and granular permission controls.
- The Claude GitHub Action, built upon this SDK, automates various development tasks like code review, feature generation from issues, and pull request modifications, leveraging existing GitHub infrastructure.
Takeaways
- The Claude Code SDK provides programmatic access to the Claude Code agent, allowing integration into headless environments and enabling new automation possibilities.
- Utilize
Claude-Pas the primary command-line interface for interacting with Claude Code, treating it like a Unix tool for piping data in and out. - Grant specific permissions using
--allow-tools(e.g.,write,bash npm run build,npm test) to enable Claude Code to perform destructive or build-related actions safely. - Leverage structured output via
--output-format JSONorstream JSONto parse Claude Code's responses programmatically, which is essential for building applications and integrations. - Use the
session IDreturned by Claude Code in structured output to resume previous contexts, enabling interactive, multi-turn conversations and workflows. - The Claude GitHub Action can automate code reviews, generate new features from GitHub issues, triage bugs, and modify existing pull requests by adding commits, all without needing custom infrastructure.
- Install the Claude GitHub Action directly in your repository using the
/install GitHub actioncommand within Claude Code, which generates a YAML configuration PR for easy setup. - Explore the open-source Claude Base Action and PR Action, built on the SDK, for inspiration on how to extend and customize Claude Code's automation capabilities.
Vocabulary
Claude Code SDK — A software development kit that provides programmatic access to the Claude Code agent, allowing developers to integrate its capabilities into their applications and workflows.
Headless Node — Running an application or service without a graphical user interface, typically in a server environment or for automation scripts.
Unix tool — A program designed to perform a specific function, often used in command-line pipelines to process text or data, emphasizing composability.
CI automation — The process of automating tasks within continuous integration pipelines, such as code reviews, linting, or feature generation.
Claude-P — A command-line utility used to interact directly with the Claude Code agent, often for ad-hoc queries or automation.
--allow-tools — A command-line flag used to explicitly grant Claude Code permissions to use specific tools (e.g., for file system writes, running scripts) for a given task.
--output-format JSON — A command-line flag to configure Claude Code's response format to be structured JSON, making it machine-readable and parsable.
session ID — A unique identifier returned by Claude Code that represents the state and context of a specific interaction or task, allowing for session resumption.
--permission-prompt-tool — A command-line flag that delegates tool permission management to an external service, allowing real-time user prompts for tool access.
GitHub Action — An event-driven automation tool provided by GitHub, enabling custom workflows to be run directly in a repository's CI/CD pipeline.
Transcript
Good afternoon, everybody. My name is Sid by the Saria. I am an engineer on the Claude Code team. And today, we're going to be talking a little bit about the Claude Code SDK and the Claude GitHub action that was just announced today. Cool. So a little bit about the agenda. We do a little quick start for the SDK, just to give some examples of how to get started and how to use the SDK. We will then dive into a live demo of the GitHub action, which should be fun. The GitHub action was built on top of the SDK, so it's meant to be a source of inspiration for the kind of things that you can do using the Claude Code SDK. We'll then dive into some more advanced features of the SDK. And then we'll end with having all the few set up the Claude GitHub action on your repost. You guys can start using it and build on top of it. Cool. Actually, before we get started, can I get a show of hands here? How many people have used Claude Code? OK. So a lot of people. And of the people who have used Claude Code, how many have used Claude Dash P or know what that is? OK. Far fewer people. It's good to know. If you guys don't have Claude Code in a laptop, that's how you get it. I encourage you to install it in a laptop and follow along. There will be parts of this talk that will be beneficial to follow along. And then if you don't want to, you don't have to. It's all you had. Cool. So what is the Claude Code SDK? It is a way to programmatically access the power of the Claude Code agent in Headless Node. This is powerful because it's a new kind of primitive and a new kind of building block that allows you to build applications that just weren't possible before. Things that you can do with the SDK are super simple things to get started. For example, you can use it like a Unix tool. The Unix is tool philosophy is what really makes Claude Code powerful because you can plug it in anywhere where you can run Bash or a terminal. So you can use it in your Unix pipelines. You can pipe stuff into it, pipe stuff out of it, have make complex chains out of it and stuff like that. You can then build CI automation on it. So you can have Claude review your code. Some people actually get Claude to write new linters for them too. Then you can go into your code if there are specific things that you've gone to define programmatically. You can get Claude Code to do it. And then we get into fans here applications as well. So if you want to build your own chat bot that's powered by Claude Code, that's certainly possible. If you want Claude Code to write you code in a new environment or a separate remote environment, you can build those kinds of applications as well. And finally, there are a few features. We talk more about the features in the coming slides. Python and TypeScript SDKs or bindings for the Claude Code SDK coming up soon. So that should make it much easier for you guys to consume it and build on top of it. So let's jump into some basic examples. Calling Claude Code SDK is as simple as doing Claude-P and following it up with the string that you want to ask Claude. So in this example, I'm telling Claude to write me a Fibonacci sequence generator. And if you notice, I also give it a dash, dash, allow tools write, which is a way for me to proactively give it access to the right tool. So it can write files to my file system. And then this is something I like doing too. Piping logs to Claude. So you can do cat.app.log and then pipe that into Claude-P. I don't like looking at logs manually. So this is something I do quite often. And as you can see, it does a pretty decent job of summarizing what the log failures were. Similarly, if you're anything like me, I just can't get myself to understand the output of ifconfig. I still don't know what it means, but Claude does. And Claude does it for me over here. And finally, this is what makes the SDK take. It is we have an output format. If you do a dash, dash, output format, JSON, Claude Code will actually output things, or its response, in JSON as opposed to plaintext. And you can parse this JSON and build on top of it. So we'll talk more about details for how this is what else you can do with this JSON. But I wanted to throw that example out there. Let's get into a significantly more complex example now, which is the Claude GitHub Action. So the log GitHub Action was built on top of the SDK. And it can be used to review code. It can be used to create new features. It can be used to triage bugs and so on. And this is also open source. So I'll include a link at the very end of the talk, so you guys can go have a look at the source for inspiration for how to use it. But for now, let's jump into a live demo on my laptop. So I have cloned a popular, small open source quiz app for the purposes of this demo. And we are going to fire it up just to see how that works. And then we will talk a lot to build something on top of it for us. So I just did an NPM start, which opened up my shiny new quiz app. It's actually pretty nifty. It allows you to choose a bunch of categories, how many questions you want. Difficult, it's definitely easy for me. I suck at trivia. Type of questions. And then there's a countdown timer. So we're not going to actually answer these unless someone feels very strongly pleased to shout out the answer. But I'm just going to just fly through these just to show you guys how this like the quiz app works. There you go. Not surprising. You got a great F. But that's OK. So this was the little demo quiz app that's open-sourced. And if you look at the issues for this repo, we see a couple very interesting ones. There's one issue that says we should add power-ups for 50-50 elimination of options and skip questions for free. Because I suck at trivia, I really like that feature. And I want to build it. And before this presentation, I already installed Claude, the Claude GitHub action on my repo. So it's already available. But we'll go over how to set that up later, too. OK. So here's the issue. It has pretty sparse details on how to implement this. It's just literally a wish list, really, like a wish feature. It's saying add a power-up option in the config 50-50 elimination for the skip question. It should award user points even though the user skipped. And the user should be able to configure this from the config page. So there's a lot of like creative room for Claude to do whatever it wants to do in this case. And I'm excited to see what it actually ends up building. So what I'm going to do is say, at Claude, please implement this feature and comment on it. So it usually does take four or five seconds for it to respond. And while it's doing that for good measure, we'll just also take this other GitHub issue. This is talking about a per question timer. So we saw there was a global timer on the quiz app, but there was no per question timer. So that's what this one's talking about. So let's go and say, Claude, please build this. And now we have two things building. Cool. Now when I get back to this tab, you see that Claude responded with a comment on this GitHub issue, saying that it's working. It also has a link to the job run, which is the GitHub action run. If I click into it, and if I actually click on the logs, I'll see that it's doing a bunch of stuff. You can see all this JSON being output. This is from the SDK. So you want to look at the JSON too much, because it's not much fun to parse it manually. But over here, we can see that it also created a 2DList for us. So Claude's now going to actually go through this 2DList and try to implement the power of feature. And similarly, for the question timer, it's going to do something similar. One more thing that we should do here is there are already a couple of pull requests that have been opened for this repo. And let's get Claude to review it or change some of these pull requests, just for fun. There's this one, which is Change Background Color to Blue. All right, I actually think I like green better. So I'm just going to be like, all right, Claude, please change this to green. This one is fairly easy. And I'm pretty sure Claude's going to do this. But I just wanted to show you guys that it can also add commits for a pull request that's already open. OK, so this is going to take a few minutes to run, and while this runs, let's go back to the presentation and then we'll check up on how this is doing towards the end. OK, cool. So let's do a little bit of a deep dive on the features of the SDK. When you call Claude-P by default, it has no edit or destructive permission access, which is great for safety, but it's not great for actually getting things done, which is why there is a dash-dash allowed tools option, which allows you to pre-configure Claude with any permissions that you think it might need in the future for your given task. So in this case, the first example you see that I've given it permissions, bash permissions to NPM run build, NPM test, and the right tool, which is a good set of permissions, because this allows Claude self-verify what it's writing and build your project and test and then continue writing. Similarly, for MCP, if you have MCP servers configured, you can allow list those MCP tools as well. So it's a very similar process. Then structured output. We already saw an example of structured output, both from the GitHub actions logs and also the little screenshot I showed you earlier. But there's two modes here. There's stream JSON and JSON. It does exactly what it sounds like. If you select stream JSON, it'll actually stream messages to you as and when they're available. Versus JSON will just give you one giant flaw of JSON at the end. And parsing this JSON and building on top of it is really how you can make use of the Claude Code SDK and create features for your users. And then you can also configure the system prompt. So you can do dash-ass system prompt, talk like a pirate, and you can get Claude Code to talk like a pirate for the rest of your day, which is actually quite fun. If you haven't done it, I'd encourage you to try it out. We also have a few user interaction features built into the SDK. And what that means is that the first one is resuming session state. So when you call Claude-p in structured output or JSON mode, it's going to return a session ID. And this session ID is useful because you can then reference the session ID to go back to the same context state that Claude had when it finished that process. So by preserving these session IDs and keeping track of them, you can enable or build user interactive features, the user says something, you pass that on to Claude. Claude returns a response, and now you want the user to give feedback on that response. And that's how this kind of enables you to build those types of interactions in your apps. And then the last one, and this one's actually pretty interesting, and it's fairly recent too. It's dash-dash permission prompt tool. We talked a little bit about how to give Claude permissions using the allowed tools flag. And that requires you to pre-configure them in advance. But what if you didn't want to do them? Because you don't know what tools Claude would want to use in the future. In that case, you can use the dash-dash permission prompt tool and offload the permission management to an MCP server. So you can ask users in real time for whether they want to accept a tool or reject a tool. And you can have an MCP server kind of handle that for you, as opposed to trying to predict which tools are OK and which tools are not. So this is fairly recent, and we'd love to get feedback on this if you guys end up trying it out. OK, let's go back to our demo and see what Claude's done. So this is the power-up issue. We can see that Claude has actually gone through his to-do list. I'm going to open a PS. There's a link over here to create a PR, and I'm going to click that and see what that gives us. I'll actually create the pull request too, so it's easier for us to review. I don't really know how this codebase works, but we'll still eyeball it just as you see if it's doing the right thing. So you see some set power-up stuff. Seems all right. There's some configuration in the main component. All right, I think what we should do, and what would make this fun, is if you should just get this branch locally and see what Claude did, because there's no way that we can actually figure out what it did in the short amount of time that we have. So I'm going to go back to my terminal, do a good fetch, check out the branch that Claude just created, and restart our process. OK, awesome. It looks like we have a power-up section now at the bottom of our config page, and it's a little check box. I like that touch. We'll keep both of them on, and let's select general knowledge. Let's start playing this game. Let's see what it did. Oh, sweet. So you see it has this little 50-50 button on the bottom left, and a skip questions button on the right. I'm just going to add 50-50 because I have no idea what the answer this is. Does anybody know what that is? D? OK, there we go. That makes sense. Cadbury, yeah. I'm going to skip this one, and then let's just breeze through the other ones for a sake of time. So we've got an F, but we got one correct answer, which is better than zero correct answers. And yeah, I guess. Yeah, I tricked us. That was a good one. But yeah, it seems like it worked. I think there's definitely more we could do here. We could show how the power, which questions we use the power upon over here. And there's definitely more we can do. But at the most basic level, I think Claude was able to do with the task that we assigned it to do, which is exciting. This is kind of the power of the GitHub action, because you don't really have to run this on your own in-fra. You can just literally comment on a thread saying, please build this for me. It uses your GitHub action runners and just does the thing. Let's also look at the PR that we told it change from blue to green. It's all hex code, so let's just see what it did in the commits. So we see there's two commits. And Claude has added this last one to switch it from blue to green. And it did it for all three of the places where the color was defined, which is awesome. I'm not going to go over the last one, the question timer, because we might run out of time. But this hopefully gives you insight into what the Claude GitHub action can do for you. Let's go back to the presentation now. So just as a recap, the Claude GitHub action, as it's implemented today, is able to read your code. It's able to create PRs for you from GitHub issues, like we just saw. It's able to create commits for you. So if you already have a PR and you comment on it, it can add a commit to an existing branch or an existing PR. It can answer questions. It doesn't have to do something. It can just literally answer questions for you. If you don't understand something, you can be like, hey, Claude, how does this work? And you can get it to answer questions. And it can of course review your code. The best part of all of this is that you don't have to take care of the infer. It runs on existing GitHub runners, which almost everyone has configured if you're using GitHub actions. So that's kind of the really nice thing about this is you don't have to worry about any of the infer. So how were the actions built? I may have mentioned that these actions were built on top of the SDK. So the SDK does form the foundation of how these actions were built. And then we have two other actions on top. We have the Claude base action. This is a thin layer that just implements the piece which talks to Claude code and returns the response from Claude. And then we have another action on top of this, which is called the PR action. And this action is responsible for all the fancy things that you saw on the PR. So it's responsible to make in comments for the to-do lists, for rendering it the right way, for adding the PR links, and things like that. So it's kind of three layers in which it's built. Both the base action and the PR action are open-source. So I would encourage you guys to go have a look, take inspiration from how that works, and maybe that inspires more ideas. Yeah. And then finally, you guys can install the Claude GitHub actions today. The easiest way to do this is to open up Claude code in a terminal in the repo that you want to install it in. And once you open up Claude code, just do slash install GitHub action. And that is going to present you with a nice flow, which guides you through configuring your GitHub action as well as merging it. So the end result of this would be a PR, which would be a YAML file for your GitHub action. And once you merge that in, and you configure your API keys and things like that, you're off the races. And you can go ahead and start tagging Claude and using Claude, like we just did right now. Small caveat. If you're a bedrock or vertex user, the instructions are a little bit different, and the tiny bit more manual. So please have a look at the docs. The docs are pretty comprehensive in helping you set up the GitHub action for both bedrock and vertex. Cool. Finally, resources. These are resources for things that we've talked about today. If you want to snap a picture, go ahead. There are open source three posts for both the base action and the Claude code action are here. And we absolutely love your feedback as well. So if you guys have any feedback on the SDK, on the GitHub action, or on Claude code, please go to our public Claude GitHub repo and file an issue there. And someone will have a look and get back to you. Cool. That's all I have for today. Thanks for joining me. And I hope you guys have a good rest of the day.