In 2014 I made a game exploring this very concept for the 2 day game jam, Ludum Dare 31 and I consider it one of my most successful LD entries.
The game was called 'Too Many Windows' and the theme was 'Entire Game on One Screen'. My game was about trying to be productive on a computer with less screen space than windows to fill it.
The windows are represented by colored rectangles.
The aim of the game is to click the red buttons which appear on the windows before the timer runs out.
The way I altered the difficulty to match the players skill level was with the timer.
Whenever the player clicks a button, the timer rewards the player with 2 seconds and 100 points.
If the timer is equal to or greater than 10 seconds, the player is only rewarded with 1 second of time and 100 points.
i.e. The timer will never get much higher than 10 seconds which means that the player is always on the edge of their seat trying to find next button.
I made the game difficult to keep each game short and therefor addictive.
For skilled players, at 5000 points I only reward them with 2 seconds if the clock is below 5 seconds remaining.
In other words, the player never has more than about 6 seconds to find the next button (after 5000 points), creating a constant sense of urgency.
And that's how I created a sense of flow in 'Too Many Windows'
I also 'juice' the game with visual feedback and audio feedback
As you can see, the game scored very highly.
If you'd like to read a more in-depth analysis of the game you can do on my other blog HERE
If you'd like to see the ludum dare page you can do HERE
And if you'd like to play the game, you can download it HERE